Skip to content

Commit 28129aa

Browse files
committed
add more windowed resolutions
1 parent 95dfd9c commit 28129aa

File tree

2 files changed

+35
-7
lines changed

2 files changed

+35
-7
lines changed

Parts/MENU.C

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ int mainmenu( void )
262262
if ( m_soundquality < 0 ) m_soundquality = 2;
263263
if ( m_soundquality > 2 ) m_soundquality = 0;
264264
#else
265-
if ( m_windowmode < 0 ) m_windowmode = 1;
266-
if ( m_windowmode > 1 ) m_windowmode = 0;
265+
if ( m_windowmode < 0 ) m_windowmode = 3;
266+
if ( m_windowmode > 3 ) m_windowmode = 0;
267267
#endif
268268
if ( m_looping < 0 ) m_looping = 1;
269269
if ( m_looping > 1 ) m_looping = 0;
@@ -342,7 +342,13 @@ int mainmenu( void )
342342
"~0 ~1 Window mode:~2 Fullscreen ~0 \n"
343343
); break;
344344
case 1: prtf(
345-
"~0 ~1 Window mode:~2 Windowed (1280x960) ~0 \n"
345+
"~0 ~1 Window mode:~2 Windowed, native (640x400) ~0 \n"
346+
); break;
347+
case 2: prtf(
348+
"~0 ~1 Window mode:~2 Windowed, double size (1280x800) ~0 \n"
349+
); break;
350+
case 3: prtf(
351+
"~0 ~1 Window mode:~2 Windowed, triple size (1920x1200) ~0 \n"
346352
); break;
347353
}
348354
col[ 1 ] &= ~0x10; col[ 2 ] &= ~0x10; prtf(

main.cpp

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,33 @@ int main( int argc, char * argv[] )
213213
{
214214
return -2;
215215
}
216-
if ( m_windowmode == 0 )
216+
switch ( m_windowmode )
217217
{
218-
windowType = Graphics::WindowType::Borderless;
219-
windowWidth = GetSystemMetrics( SM_CXSCREEN );
220-
windowHeight = GetSystemMetrics( SM_CYSCREEN );
218+
case 0:
219+
{
220+
windowType = Graphics::WindowType::Borderless;
221+
windowWidth = GetSystemMetrics( SM_CXSCREEN );
222+
windowHeight = GetSystemMetrics( SM_CYSCREEN );
223+
}
224+
break;
225+
case 1:
226+
{
227+
windowWidth = 640;
228+
windowHeight = 400;
229+
}
230+
break;
231+
case 2:
232+
{
233+
windowWidth = 1280;
234+
windowHeight = 800;
235+
}
236+
break;
237+
case 3:
238+
{
239+
windowWidth = 1920;
240+
windowHeight = 1200;
241+
}
242+
break;
221243
}
222244
#endif // _DEBUG
223245
if ( !graphics.Init( GetModuleHandle( NULL ), windowWidth, windowHeight, -1, windowType ) )

0 commit comments

Comments
 (0)