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
0e7b30b8
Verified
Commit
0e7b30b8
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
fix: ran clippy in SDL
parent
3d9f41c8
No related branches found
No related tags found
No related merge requests found
Pipeline
#2184
failed
2 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontends/sdl/src/main.rs
+4
-4
4 additions, 4 deletions
frontends/sdl/src/main.rs
with
4 additions
and
4 deletions
frontends/sdl/src/main.rs
+
4
−
4
View file @
0e7b30b8
...
@@ -34,7 +34,7 @@ pub struct Benchmark {
...
@@ -34,7 +34,7 @@ pub struct Benchmark {
impl
Benchmark
{
impl
Benchmark
{
pub
fn
new
(
count
:
usize
)
->
Self
{
pub
fn
new
(
count
:
usize
)
->
Self
{
Self
{
count
:
count
}
Self
{
count
}
}
}
}
}
...
@@ -221,7 +221,7 @@ impl Emulator {
...
@@ -221,7 +221,7 @@ impl Emulator {
let
mut
last_frame
=
0xffffu16
;
let
mut
last_frame
=
0xffffu16
;
if
current_time
>=
self
.next_tick_time_i
{
if
current_time
>=
self
.next_tick_time_i
{
let
cycle_limit
=
(
GameBoy
::
LCD_CYCLES
as
f32
/
self
.logic_ratio
as
f32
)
as
u32
;
let
cycle_limit
=
(
GameBoy
::
LCD_CYCLES
as
f32
/
self
.logic_ratio
)
as
u32
;
loop
{
loop
{
// limits the number of ticks to the typical number
// limits the number of ticks to the typical number
...
@@ -246,7 +246,7 @@ impl Emulator {
...
@@ -246,7 +246,7 @@ impl Emulator {
// to update the stream texture, copying it then to the canvas
// to update the stream texture, copying it then to the canvas
let
frame_buffer
=
self
.system
.frame_buffer
()
.as_ref
();
let
frame_buffer
=
self
.system
.frame_buffer
()
.as_ref
();
texture
texture
.update
(
None
,
frame_buffer
,
DISPLAY_WIDTH
as
usize
*
3
)
.update
(
None
,
frame_buffer
,
DISPLAY_WIDTH
*
3
)
.unwrap
();
.unwrap
();
self
.graphics.canvas
.copy
(
&
texture
,
None
,
None
)
.unwrap
();
self
.graphics.canvas
.copy
(
&
texture
,
None
,
None
)
.unwrap
();
...
@@ -265,7 +265,7 @@ impl Emulator {
...
@@ -265,7 +265,7 @@ impl Emulator {
// updates the next update time reference to the current
// updates the next update time reference to the current
// time so that it can be used from game loop control
// time so that it can be used from game loop control
self
.next_tick_time
+=
1000.0
/
logic_frequency
as
f32
;
self
.next_tick_time
+=
1000.0
/
logic_frequency
;
self
.next_tick_time_i
=
self
.next_tick_time
.ceil
()
as
u32
;
self
.next_tick_time_i
=
self
.next_tick_time
.ceil
()
as
u32
;
}
}
...
...
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