File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,16 @@ pub struct SlopDev {
2727impl SlopDev {
2828 fn start_game ( & mut self ) {
2929 // TODO: bad assumption
30- let steam_exe = "C:\\ Program Files (x86)\\ Steam\\ Steam.exe" ;
30+ let custom_steam_exe_path = self . work_dir . join ( "steam_path.txt" ) ;
31+ let steam_exe = if custom_steam_exe_path. exists ( ) {
32+ std:: fs:: read_to_string ( custom_steam_exe_path)
33+ . expect ( "failed to read custom steam exe path" )
34+ . trim ( )
35+ . to_string ( )
36+ } else {
37+ "C:\\ Program Files (x86)\\ Steam\\ Steam.exe" . to_string ( )
38+ } ;
39+
3140 std:: process:: Command :: new ( steam_exe)
3241 . arg ( "-applaunch" )
3342 . arg ( "1353230" )
@@ -268,5 +277,8 @@ impl eframe::App for SlopDev {
268277 ) ;
269278 }
270279 } ) ;
280+
281+ let _60fps = std:: time:: Duration :: from_millis ( 1000 / 60 ) ;
282+ ctx. request_repaint_after ( _60fps) ;
271283 }
272284}
You can’t perform that action at this time.
0 commit comments