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
866c2306
Verified
Commit
866c2306
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
chore: temporary reversion of changes
parent
22ee35dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#3160
passed
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/main.yml
+0
-2
0 additions, 2 deletions
.github/workflows/main.yml
frontends/libretro/src/lib.rs
+3
-6
3 additions, 6 deletions
frontends/libretro/src/lib.rs
frontends/sdl/src/main.rs
+1
-1
1 addition, 1 deletion
frontends/sdl/src/main.rs
with
4 additions
and
9 deletions
.github/workflows/main.yml
+
0
−
2
View file @
866c2306
...
@@ -168,8 +168,6 @@ jobs:
...
@@ -168,8 +168,6 @@ jobs:
run
:
rustc --version
run
:
rustc --version
-
name
:
Verify Rust code format
-
name
:
Verify Rust code format
run
:
cd frontends/libretro && cargo fmt --all -- --check
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
-
name
:
Run unit tests
run
:
cd frontends/libretro && cargo test
run
:
cd frontends/libretro && cargo test
-
name
:
Build development version
-
name
:
Build development version
...
...
This diff is collapsed.
Click to expand it.
frontends/libretro/src/lib.rs
+
3
−
6
View file @
866c2306
...
@@ -365,19 +365,16 @@ pub extern "C" fn retro_cheat_reset() {
...
@@ -365,19 +365,16 @@ pub extern "C" fn retro_cheat_reset() {
emulator
.reset_cheats
();
emulator
.reset_cheats
();
}
}
/// # Safety
///
/// This function should not be called only within Lib Retro context.
#[no_mangle]
#[no_mangle]
pub
unsafe
extern
"C"
fn
retro_cheat_set
(
_index
:
c_uint
,
enabled
:
bool
,
code
:
*
const
c_char
)
{
pub
extern
"C"
fn
retro_cheat_set
(
_index
:
c_uint
,
enabled
:
bool
,
code
:
*
const
c_char
)
{
debugln!
(
"retro_cheat_set()"
);
debugln!
(
"retro_cheat_set()"
);
// we'll just ignore cheats that are not enabled, Boytacean
// we'll just ignore cheats that are not enabled, Boytacean
// does not support pre-loading cheats
// does not support pre-loading cheats
if
!
enabled
{
if
!
enabled
{
return
;
return
;
}
}
let
emulator
=
EMULATOR
.as_mut
()
.unwrap
();
let
emulator
=
unsafe
{
EMULATOR
.as_mut
()
.unwrap
()
}
;
let
code_c
=
CStr
::
from_ptr
(
code
);
let
code_c
=
unsafe
{
CStr
::
from_ptr
(
code
)
}
;
let
code_s
=
code_c
.to_string_lossy
()
.into_owned
();
let
code_s
=
code_c
.to_string_lossy
()
.into_owned
();
emulator
.add_cheat_code
(
&
code_s
)
.unwrap
();
emulator
.add_cheat_code
(
&
code_s
)
.unwrap
();
}
}
...
...
This diff is collapsed.
Click to expand it.
frontends/sdl/src/main.rs
+
1
−
1
View file @
866c2306
...
@@ -788,7 +788,7 @@ fn main() {
...
@@ -788,7 +788,7 @@ fn main() {
// in case the default ROM path is provided and the file does not
// in case the default ROM path is provided and the file does not
// exist then fails gracefully
// exist then fails gracefully
let
path
=
Path
::
new
(
&
args
.rom_path
);
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"
);
println!
(
"No ROM file provided, please provide one using the --rom-path option"
);
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
João Magalhães
@joamag
mentioned in commit
a160b3ba
·
1 year ago
mentioned in commit
a160b3ba
mentioned in commit a160b3ba31caac3dd4984a1b8f8f7092edba05fc
Toggle commit list
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