|
|
1.1 root 1: /*
2: Hatari - dlgScreen.c
3:
4: This file is distributed under the GNU Public License, version 2 or at
5: your option any later version. Read the file gpl.txt for details.
1.1.1.9 root 6:
7: Atari monitor and Hatari window settings.
1.1 root 8: */
1.1.1.8 root 9: const char DlgScreen_fileid[] = "Hatari dlgScreen.c : " __DATE__ " " __TIME__;
1.1 root 10:
11: #include "main.h"
12: #include "configuration.h"
13: #include "dialog.h"
14: #include "sdlgui.h"
15: #include "screen.h"
16: #include "screenSnapShot.h"
1.1.1.10! root 17: #include "resolution.h"
1.1.1.2 root 18: #include "vdi.h"
1.1.1.6 root 19: #include "video.h"
1.1.1.9 root 20: #include "avi_record.h"
21: #include "statusbar.h"
1.1.1.10! root 22: #include "clocks_timings.h"
1.1.1.5 root 23:
24: #define ITEMS_IN_ARRAY(a) (sizeof(a)/sizeof(a[0]))
25:
1.1.1.9 root 26:
27: /* The Monitor dialog: */
28: #define DLGSCRN_MONO 3
29: #define DLGSCRN_RGB 4
30: #define DLGSCRN_VGA 5
31: #define DLGSCRN_TV 6
32: #define DLGSCRN_OVERSCAN 7
33: #define DLGSCRN_USEVDIRES 9
34: #define DLGSCRN_VDI_WLESS 11
35: #define DLGSCRN_VDI_WTEXT 12
36: #define DLGSCRN_VDI_WMORE 13
37: #define DLGSCRN_VDI_HLESS 15
38: #define DLGSCRN_VDI_HTEXT 16
39: #define DLGSCRN_VDI_HMORE 17
40: #define DLGSCRN_BPP1 18
41: #define DLGSCRN_BPP2 19
42: #define DLGSCRN_BPP4 20
43: #define DLGSCRN_EXIT_MONITOR 21
1.1.1.5 root 44:
45: /* Strings for VDI resolution width and height */
46: static char sVdiWidth[5];
47: static char sVdiHeight[5];
1.1 root 48:
1.1.1.9 root 49: static SGOBJ monitordlg[] =
1.1 root 50: {
1.1.1.10! root 51: { SGBOX, 0, 0, 0,0, 34,18, NULL },
1.1.1.9 root 52:
1.1.1.10! root 53: { SGBOX, 0, 0, 1,1, 32,6, NULL },
! 54: { SGTEXT, 0, 0, 10,1, 14,1, "Atari monitor" },
! 55: { SGRADIOBUT, 0, 0, 4,3, 6,1, "Mono" },
! 56: { SGRADIOBUT, 0, 0, 12,3, 6,1, "RGB" },
! 57: { SGRADIOBUT, 0, 0, 19,3, 6,1, "VGA" },
! 58: { SGRADIOBUT, 0, 0, 26,3, 6,1, "TV" },
! 59: { SGCHECKBOX, 0, 0, 6,5, 22,1, "Show ST/STE borders" },
! 60:
! 61: { SGBOX, 0, 0, 1,8, 32,7, NULL },
! 62: { SGCHECKBOX, 0, 0, 4,9, 33,1, "Use extended VDI screen" },
! 63: { SGTEXT, 0, 0, 4,11, 5,1, "Size:" },
! 64: { SGBUTTON, 0, 0, 6,12, 1,1, "\x04" }, /* Arrow left */
! 65: { SGTEXT, 0, 0, 8,12, 4,1, sVdiWidth },
! 66: { SGBUTTON, 0, 0, 13,12, 1,1, "\x03" }, /* Arrow right */
! 67: { SGTEXT, 0, 0, 4,13, 1,1, "x" },
! 68: { SGBUTTON, 0, 0, 6,13, 1,1, "\x04" }, /* Arrow left */
! 69: { SGTEXT, 0, 0, 8,13, 4,1, sVdiHeight },
! 70: { SGBUTTON, 0, 0, 13,13, 1,1, "\x03" }, /* Arrow right */
1.1.1.9 root 71:
72: { SGRADIOBUT, SG_EXIT, 0, 18,11, 11,1, " 2 colors" },
73: { SGRADIOBUT, SG_EXIT, 0, 18,12, 11,1, " 4 colors" },
74: { SGRADIOBUT, SG_EXIT, 0, 18,13, 11,1, "16 colors" },
75:
1.1.1.10! root 76: { SGBUTTON, SG_DEFAULT, 0, 7,16, 20,1, "Back to main menu" },
1.1.1.9 root 77: { -1, 0, 0, 0,0, 0,0, NULL }
78: };
79:
80:
81: /* The window dialog: */
82: #define DLGSCRN_FULLSCRN 3
1.1.1.10! root 83: #define DLGSCRN_STATUSBAR 5
! 84: #define DLGSCRN_DRIVELED 6
! 85: #define DLGSCRN_NONE 7
! 86: #define DLGSCRN_SKIP0 9
! 87: #define DLGSCRN_SKIP1 10
! 88: #define DLGSCRN_SKIP2 11
! 89: #define DLGSCRN_SKIP3 12
! 90: #define DLGSCRN_SKIP4 13
! 91: #define DLGSCRN_KEEP_RES 15
! 92: #define DLGSCRN_MAX_WLESS 18
! 93: #define DLGSCRN_MAX_WTEXT 19
! 94: #define DLGSCRN_MAX_WMORE 20
! 95: #define DLGSCRN_MAX_HLESS 22
! 96: #define DLGSCRN_MAX_HTEXT 23
! 97: #define DLGSCRN_MAX_HMORE 24
! 98: #define DLGSCRN_CROP 27
! 99: #define DLGSCRN_CAPTURE 28
! 100: #define DLGSCRN_RECANIM 29
! 101: #define DLGSCRN_EXIT_WINDOW 30
1.1.1.9 root 102:
103: /* needs to match Frame skip values in windowdlg[]! */
104: static const int skip_frames[] = { 0, 1, 2, 4, AUTO_FRAMESKIP_LIMIT };
105:
106: /* Strings for doubled resolution max width and height */
107: static char sMaxWidth[5];
108: static char sMaxHeight[5];
109:
110: #define MAX_SIZE_STEP 8
1.1.1.2 root 111:
1.1.1.9 root 112: /* The window dialog: */
113: static SGOBJ windowdlg[] =
114: {
1.1.1.10! root 115: { SGBOX, 0, 0, 0,0, 52,20, NULL },
1.1.1.9 root 116:
1.1.1.10! root 117: { SGBOX, 0, 0, 1,1, 50,10, NULL },
! 118: { SGTEXT, 0, 0, 4,2, 20,1, "Hatari screen options" },
! 119: { SGCHECKBOX, 0, 0, 4,4, 12,1, "Fullscreen" },
! 120: { SGTEXT, 0, 0, 4,6, 12,1, "Indicators:" },
! 121: { SGRADIOBUT, 0, 0, 6,7, 11,1, "Statusbar" },
! 122: { SGRADIOBUT, 0, 0, 6,8, 11,1, "Drive led" },
! 123: { SGRADIOBUT, 0, 0, 6,9, 11,1, "None" },
! 124: { SGTEXT, 0, 0, 19,4, 12,1, "Frame skip:" },
! 125: { SGRADIOBUT, 0, 0, 21,5, 7,1, "Off" },
! 126: { SGRADIOBUT, 0, 0, 21,6, 7,1, "1" },
! 127: { SGRADIOBUT, 0, 0, 21,7, 7,1, "2" },
! 128: { SGRADIOBUT, 0, 0, 21,8, 7,1, "4" },
! 129: { SGRADIOBUT, 0, 0, 21,9, 7,1, "Auto" },
! 130: { SGTEXT, 0, 0, 33,2, 15,1, "Falcon/TT only:" },
! 131: { SGCHECKBOX, 0, 0, 33,4, 14,2, "Keep desktop" },
! 132: { SGTEXT, 0, 0, 35,5, 12,1, "resolution" },
! 133: { SGTEXT, 0, 0, 33,7, 15,1, "Max zoomed win:" },
! 134: { SGBUTTON, 0, 0, 35,8, 1,1, "\x04" }, /* Arrow left */
! 135: { SGTEXT, 0, 0, 37,8, 4,1, sMaxWidth },
! 136: { SGBUTTON, 0, 0, 43,8, 1,1, "\x03" }, /* Arrow right */
! 137: { SGTEXT, 0, 0, 33,9, 1,1, "x" },
! 138: { SGBUTTON, 0, 0, 35,9, 1,1, "\x04" }, /* Arrow left */
! 139: { SGTEXT, 0, 0, 37,9, 4,1, sMaxHeight },
! 140: { SGBUTTON, 0, 0, 43,9, 1,1, "\x03" }, /* Arrow right */
! 141:
! 142: { SGBOX, 0, 0, 1,12, 50,5, NULL },
! 143: { SGTEXT, 0, 0, 7,13, 16,1, "Screen capture" },
! 144: { SGCHECKBOX, 0, 0, 8,15, 16,1, "Crop statusbar" },
! 145: { SGBUTTON, 0, 0, 29,13, 14,1, " Screenshot " },
! 146: { SGBUTTON, 0, 0, 29,15, 14,1, " Record AVI " },
1.1.1.2 root 147:
1.1.1.10! root 148: { SGBUTTON, SG_DEFAULT, 0, 17,18, 20,1, "Back to main menu" },
1.1.1.5 root 149: { -1, 0, 0, 0,0, 0,0, NULL }
1.1 root 150: };
151:
152:
1.1.1.9 root 153: /* ---------------------------------------------------------------- */
1.1.1.5 root 154:
1.1.1.9 root 155: static int nVdiStepX, nVdiStepY; /* VDI resolution changing steps */
1.1.1.5 root 156:
157: /**
158: * Set width and height stepping for VDI resolution changing.
159: * Depending on the color depth we can only change the VDI resolution
160: * in certain steps:
161: * - The screen width must be dividable by 16 bytes (i.e. 128 pixels in
162: * monochrome, 32 pixels in 16 color mode), or the text mode scrolling
163: * function of TOS will fail.
164: * - The screen height must be a multiple of the character cell height
165: * (i.e. 16 pixels in monochrome, 8 pixels in color mode).
166: */
1.1.1.9 root 167: static void DlgMonitor_SetVdiStepping(void)
1.1.1.5 root 168: {
1.1.1.9 root 169: if (monitordlg[DLGSCRN_BPP1].state & SG_SELECTED)
1.1.1.5 root 170: {
171: nVdiStepX = 128;
172: nVdiStepY = 16;
173: }
1.1.1.9 root 174: else if (monitordlg[DLGSCRN_BPP2].state & SG_SELECTED)
1.1.1.5 root 175: {
176: nVdiStepX = 64;
177: nVdiStepY = 8;
178: }
179: else
180: {
181: nVdiStepX = 32;
182: nVdiStepY = 8;
183: }
184: }
185:
186:
1.1 root 187: /*-----------------------------------------------------------------------*/
1.1.1.5 root 188: /**
1.1.1.9 root 189: * Show and process the monitor dialog.
1.1.1.5 root 190: */
1.1.1.9 root 191: void Dialog_MonitorDlg(void)
1.1 root 192: {
1.1.1.9 root 193: int but;
1.1.1.5 root 194: unsigned int i;
1.1.1.8 root 195: MONITORTYPE mti;
1.1 root 196:
1.1.1.9 root 197: SDLGui_CenterDlg(monitordlg);
1.1 root 198:
1.1.1.9 root 199: /* Set up general monitor options in the dialog from actual values: */
1.1.1.5 root 200:
1.1.1.6 root 201: if (ConfigureParams.Screen.bAllowOverscan)
1.1.1.9 root 202: monitordlg[DLGSCRN_OVERSCAN].state |= SG_SELECTED;
1.1.1.5 root 203: else
1.1.1.9 root 204: monitordlg[DLGSCRN_OVERSCAN].state &= ~SG_SELECTED;
1.1.1.5 root 205:
206: for (i = DLGSCRN_MONO; i <= DLGSCRN_TV; i++)
1.1.1.9 root 207: monitordlg[i].state &= ~SG_SELECTED;
208: monitordlg[DLGSCRN_MONO+ConfigureParams.Screen.nMonitorType].state |= SG_SELECTED;
1.1.1.5 root 209:
210: /* Initialize VDI resolution options: */
211:
1.1.1.6 root 212: if (ConfigureParams.Screen.bUseExtVdiResolutions)
1.1.1.9 root 213: monitordlg[DLGSCRN_USEVDIRES].state |= SG_SELECTED;
1.1.1.5 root 214: else
1.1.1.9 root 215: monitordlg[DLGSCRN_USEVDIRES].state &= ~SG_SELECTED;
1.1.1.5 root 216: for (i=0; i<3; i++)
1.1.1.9 root 217: monitordlg[DLGSCRN_BPP1 + i].state &= ~SG_SELECTED;
218: monitordlg[DLGSCRN_BPP1 + ConfigureParams.Screen.nVdiColors - GEMCOLOR_2].state |= SG_SELECTED;
1.1.1.6 root 219: sprintf(sVdiWidth, "%4i", ConfigureParams.Screen.nVdiWidth);
220: sprintf(sVdiHeight, "%4i", ConfigureParams.Screen.nVdiHeight);
1.1.1.9 root 221: DlgMonitor_SetVdiStepping();
1.1.1.5 root 222:
1.1.1.9 root 223: /* The monitor dialog main loop */
1.1.1.5 root 224: do
225: {
1.1.1.9 root 226: but = SDLGui_DoDialog(monitordlg, NULL);
1.1.1.5 root 227: switch (but)
228: {
1.1.1.9 root 229: case DLGSCRN_VDI_WLESS:
1.1.1.6 root 230: ConfigureParams.Screen.nVdiWidth = VDI_Limit(ConfigureParams.Screen.nVdiWidth - nVdiStepX,
1.1.1.5 root 231: nVdiStepX, MIN_VDI_WIDTH, MAX_VDI_WIDTH);
1.1.1.6 root 232: sprintf(sVdiWidth, "%4i", ConfigureParams.Screen.nVdiWidth);
1.1.1.5 root 233: break;
1.1.1.9 root 234: case DLGSCRN_VDI_WMORE:
1.1.1.6 root 235: ConfigureParams.Screen.nVdiWidth = VDI_Limit(ConfigureParams.Screen.nVdiWidth + nVdiStepX,
1.1.1.5 root 236: nVdiStepX, MIN_VDI_WIDTH, MAX_VDI_WIDTH);
1.1.1.6 root 237: sprintf(sVdiWidth, "%4i", ConfigureParams.Screen.nVdiWidth);
1.1.1.5 root 238: break;
239:
1.1.1.9 root 240: case DLGSCRN_VDI_HLESS:
1.1.1.6 root 241: ConfigureParams.Screen.nVdiHeight = VDI_Limit(ConfigureParams.Screen.nVdiHeight - nVdiStepY,
1.1.1.5 root 242: nVdiStepY, MIN_VDI_HEIGHT, MAX_VDI_HEIGHT);
1.1.1.6 root 243: sprintf(sVdiHeight, "%4i", ConfigureParams.Screen.nVdiHeight);
1.1.1.5 root 244: break;
1.1.1.9 root 245: case DLGSCRN_VDI_HMORE:
1.1.1.6 root 246: ConfigureParams.Screen.nVdiHeight = VDI_Limit(ConfigureParams.Screen.nVdiHeight + nVdiStepY,
1.1.1.5 root 247: nVdiStepY, MIN_VDI_HEIGHT, MAX_VDI_HEIGHT);
1.1.1.6 root 248: sprintf(sVdiHeight, "%4i", ConfigureParams.Screen.nVdiHeight);
1.1.1.5 root 249: break;
250:
251: case DLGSCRN_BPP1:
252: case DLGSCRN_BPP2:
253: case DLGSCRN_BPP4:
1.1.1.9 root 254: DlgMonitor_SetVdiStepping();
1.1.1.5 root 255: /* Align resolution to actual conditions: */
1.1.1.6 root 256: ConfigureParams.Screen.nVdiWidth = VDI_Limit(ConfigureParams.Screen.nVdiWidth, nVdiStepX,
1.1.1.5 root 257: MIN_VDI_WIDTH, MAX_VDI_WIDTH);
1.1.1.6 root 258: ConfigureParams.Screen.nVdiHeight = VDI_Limit(ConfigureParams.Screen.nVdiHeight, nVdiStepY,
1.1.1.5 root 259: MIN_VDI_HEIGHT, MAX_VDI_HEIGHT);
1.1.1.6 root 260: sprintf(sVdiWidth, "%4i", ConfigureParams.Screen.nVdiWidth);
261: sprintf(sVdiHeight, "%4i", ConfigureParams.Screen.nVdiHeight);
1.1.1.5 root 262: break;
1.1.1.9 root 263: }
264: }
265: while (but != DLGSCRN_EXIT_MONITOR && but != SDLGUI_QUIT
266: && but != SDLGUI_ERROR && !bQuitProgram);
267:
268: /* Read new values from dialog: */
269:
270: ConfigureParams.Screen.bAllowOverscan = (monitordlg[DLGSCRN_OVERSCAN].state & SG_SELECTED);
271:
272: for (mti = MONITOR_TYPE_MONO; mti <= MONITOR_TYPE_TV; mti++)
273: {
274: if (monitordlg[mti + DLGSCRN_MONO].state & SG_SELECTED)
275: {
276: ConfigureParams.Screen.nMonitorType = mti;
277: break;
278: }
279: }
280:
281: ConfigureParams.Screen.bUseExtVdiResolutions = (monitordlg[DLGSCRN_USEVDIRES].state & SG_SELECTED);
282: for (i=0; i<3; i++)
283: {
284: if (monitordlg[DLGSCRN_BPP1 + i].state & SG_SELECTED)
285: ConfigureParams.Screen.nVdiColors = GEMCOLOR_2 + i;
286: }
287: }
288:
289:
290: /*-----------------------------------------------------------------------*/
291: /**
292: * Show and process the window dialog.
293: */
294: void Dialog_WindowDlg(void)
295: {
1.1.1.10! root 296: int deskw, deskh, but, skip = 0;
1.1.1.9 root 297: unsigned int i;
298:
299: SDLGui_CenterDlg(windowdlg);
300:
301: /* Set up general window options in the dialog from actual values: */
302:
303: if (ConfigureParams.Screen.bFullScreen)
304: windowdlg[DLGSCRN_FULLSCRN].state |= SG_SELECTED;
305: else
306: windowdlg[DLGSCRN_FULLSCRN].state &= ~SG_SELECTED;
307:
1.1.1.10! root 308: if (ConfigureParams.Screen.bKeepResolution)
! 309: windowdlg[DLGSCRN_KEEP_RES].state |= SG_SELECTED;
! 310: else
! 311: windowdlg[DLGSCRN_KEEP_RES].state &= ~SG_SELECTED;
! 312:
! 313: windowdlg[DLGSCRN_STATUSBAR].state |= SG_SELECTED;
! 314:
! 315: windowdlg[DLGSCRN_STATUSBAR].state &= ~SG_SELECTED;
! 316: windowdlg[DLGSCRN_DRIVELED].state &= ~SG_SELECTED;
! 317: windowdlg[DLGSCRN_NONE].state &= ~SG_SELECTED;
1.1.1.9 root 318: if (ConfigureParams.Screen.bShowStatusbar)
319: windowdlg[DLGSCRN_STATUSBAR].state |= SG_SELECTED;
1.1.1.10! root 320: else if (ConfigureParams.Screen.bShowDriveLed)
! 321: windowdlg[DLGSCRN_DRIVELED].state |= SG_SELECTED;
1.1.1.9 root 322:
323: for (i = 0; i < ITEMS_IN_ARRAY(skip_frames); i++)
324: {
325: if (ConfigureParams.Screen.nFrameSkips >= skip_frames[i])
326: skip = i;
327: windowdlg[i+DLGSCRN_SKIP0].state &= ~SG_SELECTED;
328: }
329: windowdlg[DLGSCRN_SKIP0+skip].state |= SG_SELECTED;
330:
1.1.1.10! root 331: Resolution_GetDesktopSize(&deskw, &deskh);
1.1.1.9 root 332: sprintf(sMaxWidth, "%4i", ConfigureParams.Screen.nMaxWidth);
333: sprintf(sMaxHeight, "%4i", ConfigureParams.Screen.nMaxHeight);
334:
335: /* Initialize window capture options: */
336:
1.1.1.10! root 337: if (ConfigureParams.Screen.bCrop)
! 338: windowdlg[DLGSCRN_CROP].state |= SG_SELECTED;
1.1.1.9 root 339: else
1.1.1.10! root 340: windowdlg[DLGSCRN_CROP].state &= ~SG_SELECTED;
1.1.1.9 root 341:
342: if (Avi_AreWeRecording())
343: windowdlg[DLGSCRN_RECANIM].txt = "Stop record";
344: else
345: windowdlg[DLGSCRN_RECANIM].txt = "Record AVI";
346:
347: /* The window dialog main loop */
348: do
349: {
350: but = SDLGui_DoDialog(windowdlg, NULL);
351: switch (but)
352: {
353: case DLGSCRN_MAX_WLESS:
354: ConfigureParams.Screen.nMaxWidth = VDI_Limit(ConfigureParams.Screen.nMaxWidth - MAX_SIZE_STEP,
1.1.1.10! root 355: MAX_SIZE_STEP, MIN_VDI_WIDTH, deskw);
1.1.1.9 root 356: sprintf(sMaxWidth, "%4i", ConfigureParams.Screen.nMaxWidth);
357: break;
358: case DLGSCRN_MAX_WMORE:
359: ConfigureParams.Screen.nMaxWidth = VDI_Limit(ConfigureParams.Screen.nMaxWidth + MAX_SIZE_STEP,
1.1.1.10! root 360: MAX_SIZE_STEP, MIN_VDI_WIDTH, deskw);
1.1.1.9 root 361: sprintf(sMaxWidth, "%4i", ConfigureParams.Screen.nMaxWidth);
362: break;
363:
364: case DLGSCRN_MAX_HLESS:
365: ConfigureParams.Screen.nMaxHeight = VDI_Limit(ConfigureParams.Screen.nMaxHeight - MAX_SIZE_STEP,
1.1.1.10! root 366: MAX_SIZE_STEP, MIN_VDI_HEIGHT, deskh);
1.1.1.9 root 367: sprintf(sMaxHeight, "%4i", ConfigureParams.Screen.nMaxHeight);
368: break;
369: case DLGSCRN_MAX_HMORE:
370: ConfigureParams.Screen.nMaxHeight = VDI_Limit(ConfigureParams.Screen.nMaxHeight + MAX_SIZE_STEP,
1.1.1.10! root 371: MAX_SIZE_STEP, MIN_VDI_HEIGHT, deskh);
1.1.1.9 root 372: sprintf(sMaxHeight, "%4i", ConfigureParams.Screen.nMaxHeight);
373: break;
1.1.1.5 root 374:
375: case DLGSCRN_CAPTURE:
376: SDL_UpdateRect(sdlscrn, 0,0,0,0);
1.1.1.10! root 377: ConfigureParams.Screen.bCrop = (windowdlg[DLGSCRN_CROP].state & SG_SELECTED);
1.1.1.5 root 378: ScreenSnapShot_SaveScreen();
379: break;
1.1.1.9 root 380:
381: case DLGSCRN_RECANIM:
382: if (Avi_AreWeRecording())
1.1.1.5 root 383: {
1.1.1.9 root 384: /* AVI indexing can take a while for larger files */
385: Statusbar_AddMessage("Finishing AVI file...", 100);
386: Statusbar_Update(sdlscrn);
387: Avi_StopRecording();
388: windowdlg[DLGSCRN_RECANIM].txt = "Record AVI";
389: Statusbar_AddMessage("Emulation paused", 100);
390: Statusbar_Update(sdlscrn);
1.1.1.5 root 391: }
392: else
393: {
1.1.1.10! root 394: ConfigureParams.Screen.bCrop = (windowdlg[DLGSCRN_CROP].state & SG_SELECTED);
! 395: Avi_StartRecording ( ConfigureParams.Video.AviRecordFile , ConfigureParams.Screen.bCrop ,
! 396: ConfigureParams.Video.AviRecordFps == 0 ?
! 397: ClocksTimings_GetVBLPerSec ( ConfigureParams.System.nMachineType , nScreenRefreshRate ) :
! 398: (Uint32)ConfigureParams.Video.AviRecordFps << CLOCKS_TIMINGS_SHIFT_VBL ,
! 399: 1 << CLOCKS_TIMINGS_SHIFT_VBL ,
! 400: ConfigureParams.Video.AviRecordVcodec );
1.1.1.9 root 401: windowdlg[DLGSCRN_RECANIM].txt = "Stop record";
1.1.1.5 root 402: }
403: break;
404: }
405: }
1.1.1.9 root 406: while (but != DLGSCRN_EXIT_WINDOW && but != SDLGUI_QUIT
1.1.1.5 root 407: && but != SDLGUI_ERROR && !bQuitProgram);
408:
409: /* Read new values from dialog: */
410:
1.1.1.9 root 411: ConfigureParams.Screen.bFullScreen = (windowdlg[DLGSCRN_FULLSCRN].state & SG_SELECTED);
1.1.1.10! root 412: ConfigureParams.Screen.bKeepResolution = (windowdlg[DLGSCRN_KEEP_RES].state & SG_SELECTED);
1.1.1.5 root 413:
1.1.1.10! root 414: ConfigureParams.Screen.bShowStatusbar = false;
! 415: ConfigureParams.Screen.bShowDriveLed = false;
1.1.1.9 root 416: if (windowdlg[DLGSCRN_STATUSBAR].state & SG_SELECTED)
1.1.1.8 root 417: ConfigureParams.Screen.bShowStatusbar = true;
1.1.1.10! root 418: else if (windowdlg[DLGSCRN_DRIVELED].state & SG_SELECTED)
! 419: ConfigureParams.Screen.bShowDriveLed = true;
1.1.1.5 root 420:
421: for (i = DLGSCRN_SKIP0; i <= DLGSCRN_SKIP4; i++)
422: {
1.1.1.9 root 423: if (windowdlg[i].state & SG_SELECTED)
1.1.1.5 root 424: {
1.1.1.6 root 425: ConfigureParams.Screen.nFrameSkips = skip_frames[i-DLGSCRN_SKIP0];
1.1.1.5 root 426: break;
427: }
428: }
1.1.1.2 root 429:
1.1.1.10! root 430: ConfigureParams.Screen.bCrop = (windowdlg[DLGSCRN_CROP].state & SG_SELECTED);
1.1 root 431: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.