Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
boytacean
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
João Magalhães
boytacean
Commits
a160b3ba
Verified
Commit
a160b3ba
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
Revert "chore: temporary reversion of changes"
This reverts commit
866c2306
.
parent
866c2306
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/main.yml
+2
-0
2 additions, 0 deletions
.github/workflows/main.yml
frontends/libretro/src/lib.rs
+6
-3
6 additions, 3 deletions
frontends/libretro/src/lib.rs
frontends/sdl/src/main.rs
+1
-1
1 addition, 1 deletion
frontends/sdl/src/main.rs
with
9 additions
and
4 deletions
.github/workflows/main.yml
+
2
−
0
View file @
a160b3ba
...
...
@@ -168,6 +168,8 @@ jobs:
run
:
rustc --version
-
name
:
Verify Rust code format
run
:
cd frontends/libretro && cargo fmt --all -- --check
-
name
:
Verify Rust code linting
run
:
cd frontends/libretro && cargo clippy -- -D warnings -A unknown-lints
-
name
:
Run unit tests
run
:
cd frontends/libretro && cargo test
-
name
:
Build development version
...
...
This diff is collapsed.
Click to expand it.
frontends/libretro/src/lib.rs
+
6
−
3
View file @
a160b3ba
...
...
@@ -365,16 +365,19 @@ pub extern "C" fn retro_cheat_reset() {
emulator
.reset_cheats
();
}
/// # Safety
///
/// This function should not be called only within Lib Retro context.
#[no_mangle]
pub
extern
"C"
fn
retro_cheat_set
(
_index
:
c_uint
,
enabled
:
bool
,
code
:
*
const
c_char
)
{
pub
unsafe
extern
"C"
fn
retro_cheat_set
(
_index
:
c_uint
,
enabled
:
bool
,
code
:
*
const
c_char
)
{
debugln!
(
"retro_cheat_set()"
);
// we'll just ignore cheats that are not enabled, Boytacean
// does not support pre-loading cheats
if
!
enabled
{
return
;
}
let
emulator
=
unsafe
{
EMULATOR
.as_mut
()
.unwrap
()
}
;
let
code_c
=
unsafe
{
CStr
::
from_ptr
(
code
)
}
;
let
emulator
=
EMULATOR
.as_mut
()
.unwrap
();
let
code_c
=
CStr
::
from_ptr
(
code
);
let
code_s
=
code_c
.to_string_lossy
()
.into_owned
();
emulator
.add_cheat_code
(
&
code_s
)
.unwrap
();
}
...
...
This diff is collapsed.
Click to expand it.
frontends/sdl/src/main.rs
+
1
−
1
View file @
a160b3ba
...
...
@@ -788,7 +788,7 @@ fn main() {
// in case the default ROM path is provided and the file does not
// exist then fails gracefully
let
path
=
Path
::
new
(
&
args
.rom_path
);
if
&
args
.rom_path
==
DEFAULT_ROM_PATH
&&
!
path
.exists
()
{
if
args
.rom_path
==
DEFAULT_ROM_PATH
&&
!
path
.exists
()
{
println!
(
"No ROM file provided, please provide one using the --rom-path option"
);
return
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment