-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: RSUU <[email protected]>
- Loading branch information
Showing
3 changed files
with
5 additions
and
39 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,5 @@ | ||
#[cfg(target_arch = "x86_64")] | ||
#[cfg(not(target_arch = "wasm32"))] | ||
pub mod desktop; | ||
|
||
#[cfg(target_arch = "wasm32")] | ||
pub mod web; | ||
|
||
// event_loop.run(move |event, _target, control_flow| { | ||
// let start_time = Instant::now(); | ||
// match event { | ||
// Event::WindowEvent { event: WindowEvent::CloseRequested, .. } => { | ||
// *control_flow = ControlFlow::Exit; | ||
// }, | ||
// ... | ||
// /* | ||
// * Process events here | ||
// */ | ||
// } | ||
// match *control_flow { | ||
// ControlFlow::Exit => (), | ||
// _ => { | ||
// /* | ||
// * Grab window handle from the display (untested - based on API) | ||
// */ | ||
// display.gl_window().window().request_redraw(); | ||
// /* | ||
// * Below logic to attempt hitting TARGET_FPS. | ||
// * Basically, sleep for the rest of our milliseconds | ||
// */ | ||
// let elapsed_time = Instant::now().duration_since(start_time).as_millis() as u64; | ||
// | ||
// let wait_millis = match 1000 / TARGET_FPS >= elapsed_time { | ||
// true => 1000 / TARGET_FPS - elapsed_time, | ||
// false => 0 | ||
// }; | ||
// let new_inst = start_time + std::time::Duration::from_millis(wait_millis); | ||
// *control_flow = ControlFlow::WaitUntil(new_inst); | ||
// } | ||
// } | ||
// }); |