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
8e7183a7
Verified
Commit
8e7183a7
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
refactor: more clippy
parent
42f106dc
No related branches found
No related tags found
No related merge requests found
Pipeline
#1531
passed
2 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/sdl/src/main.rs
+2
-2
2 additions, 2 deletions
examples/sdl/src/main.rs
examples/sdl/src/util.rs
+6
-6
6 additions, 6 deletions
examples/sdl/src/util.rs
with
8 additions
and
8 deletions
examples/sdl/src/main.rs
+
2
−
2
View file @
8e7183a7
...
@@ -23,7 +23,7 @@ const LOGIC_RATIO: f32 = 2.0;
...
@@ -23,7 +23,7 @@ const LOGIC_RATIO: f32 = 2.0;
const
SCREEN_SCALE
:
f32
=
2.0
;
const
SCREEN_SCALE
:
f32
=
2.0
;
/// The base title to be used in the window.
/// The base title to be used in the window.
static
TITLE
:
&
'static
str
=
"Boytacean"
;
static
TITLE
:
&
str
=
"Boytacean"
;
pub
struct
Emulator
{
pub
struct
Emulator
{
system
:
GameBoy
,
system
:
GameBoy
,
...
@@ -36,7 +36,7 @@ pub struct Emulator {
...
@@ -36,7 +36,7 @@ pub struct Emulator {
impl
Emulator
{
impl
Emulator
{
pub
fn
new
(
system
:
GameBoy
,
screen_scale
:
f32
)
->
Self
{
pub
fn
new
(
system
:
GameBoy
,
screen_scale
:
f32
)
->
Self
{
Self
{
Self
{
system
:
system
,
system
,
graphics
:
Graphics
::
new
(
graphics
:
Graphics
::
new
(
TITLE
,
TITLE
,
DISPLAY_WIDTH
as
u32
,
DISPLAY_WIDTH
as
u32
,
...
...
This diff is collapsed.
Click to expand it.
examples/sdl/src/util.rs
+
6
−
6
View file @
8e7183a7
...
@@ -49,12 +49,12 @@ impl Graphics {
...
@@ -49,12 +49,12 @@ impl Graphics {
canvas
.clear
();
canvas
.clear
();
Self
{
Self
{
canvas
:
canvas
,
canvas
,
video_subsystem
:
video_subsystem
,
video_subsystem
,
timer_subsystem
:
timer_subsystem
,
timer_subsystem
,
audio_subsystem
:
audio_subsystem
,
audio_subsystem
,
event_pump
:
event_pump
,
event_pump
,
ttf_context
:
ttf_context
,
ttf_context
,
}
}
}
}
...
...
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