@@ -10,6 +10,7 @@ pub struct GopherEguiApp {
10
10
selected_profile : [ String ; 4 ] ,
11
11
input_profiles : Vec < String > ,
12
12
controller_enabled : [ bool ; 4 ] ,
13
+ upscale : bool ,
13
14
}
14
15
15
16
fn get_input_profiles ( game_ui : & ui:: Ui ) -> Vec < String > {
@@ -65,6 +66,7 @@ impl GopherEguiApp {
65
66
controllers : get_controllers ( & game_ui) ,
66
67
input_profiles : get_input_profiles ( & game_ui) ,
67
68
controller_enabled : game_ui. config . input . controller_enabled ,
69
+ upscale : game_ui. config . video . upscale ,
68
70
}
69
71
}
70
72
}
@@ -74,6 +76,7 @@ fn save_config(
74
76
selected_controller : [ i32 ; 4 ] ,
75
77
selected_profile : [ String ; 4 ] ,
76
78
controller_enabled : [ bool ; 4 ] ,
79
+ upscale : bool ,
77
80
) {
78
81
let joystick_subsystem = game_ui. joystick_subsystem . as_ref ( ) . unwrap ( ) ;
79
82
for ( pos, item) in selected_controller. iter ( ) . enumerate ( ) {
@@ -91,6 +94,8 @@ fn save_config(
91
94
92
95
game_ui. config . input . input_profile_binding = selected_profile;
93
96
game_ui. config . input . controller_enabled = controller_enabled;
97
+
98
+ game_ui. config . video . upscale = upscale;
94
99
}
95
100
96
101
impl Drop for GopherEguiApp {
@@ -101,6 +106,7 @@ impl Drop for GopherEguiApp {
101
106
self . selected_controller ,
102
107
self . selected_profile . clone ( ) ,
103
108
self . controller_enabled ,
109
+ self . upscale ,
104
110
) ;
105
111
}
106
112
}
@@ -148,6 +154,7 @@ impl eframe::App for GopherEguiApp {
148
154
let selected_controller = self . selected_controller ;
149
155
let selected_profile = self . selected_profile . clone ( ) ;
150
156
let controller_enabled = self . controller_enabled ;
157
+ let upscale = self . upscale ;
151
158
execute ( async move {
152
159
let file = task. await ;
153
160
@@ -166,6 +173,7 @@ impl eframe::App for GopherEguiApp {
166
173
selected_controller,
167
174
selected_profile,
168
175
controller_enabled,
176
+ upscale,
169
177
) ;
170
178
device:: run_game ( std:: path:: Path :: new ( file. path ( ) ) , & mut device, false ) ;
171
179
let _ = std:: fs:: remove_file ( running_file. clone ( ) ) ;
@@ -233,6 +241,8 @@ impl eframe::App for GopherEguiApp {
233
241
}
234
242
} ) ;
235
243
ui. add_space ( 32.0 ) ;
244
+ ui. checkbox ( & mut self . upscale , "High-Res Graphics" ) ;
245
+ ui. add_space ( 32.0 ) ;
236
246
ui. label ( format ! ( "Version: {}" , env!( "CARGO_PKG_VERSION" ) ) ) ;
237
247
} ) ;
238
248
}
0 commit comments