void SetAllPreferences() { /* now make the necessary settings */ SetDeferredUpdate(); SetShowConsole(); SetDynamicConsole(); SetReduceCPUUsage(); SetReduceCPUInBackground(); Set3ButtonMouse(); Set1ButtonMouse(); SetUseDirectSound(); SetAllowFileAccess(); SetAllowImageWrite(); SetAllowSocketAccess(); SetShowAllocations(); SetPriorityBoost(); SetB3DXUsesOpenGL(); SetCaseSensitiveFileMode(); }
void HandlePrefsMenu(int cmd) { switch(cmd) { case ID_ABOUT: MessageBox(stWindow,VM_VERSION_TEXT, TEXT("About ") TEXT(VM_NAME) TEXT(" on Win32"), MB_OK); break; case ID_DEFERUPDATES: fDeferredUpdate = !fDeferredUpdate; SetDeferredUpdate(); break; case ID_SHOWCONSOLE: fShowConsole = !fShowConsole; SetShowConsole(); break; case ID_DYNAMICCONSOLE: fDynamicConsole = !fDynamicConsole; SetDynamicConsole(); break; case ID_REDUCECPUUSAGE: fReduceCPUUsage = !fReduceCPUUsage; SetReduceCPUUsage(); break; case ID_3BUTTONMOUSE: f3ButtonMouse = !f3ButtonMouse; Set3ButtonMouse(); break; case ID_DEFAULTPRINTER: SetTheDefaultPrinter(); break; case ID_REDUCEBACKGROUNDCPU: fReduceCPUInBackground = !fReduceCPUInBackground; SetReduceCPUInBackground(); break; case ID_1BUTTONMOUSE: f1ButtonMouse = !f1ButtonMouse; Set1ButtonMouse(); break; case ID_DIRECTSOUND: fUseDirectSound = !fUseDirectSound; SetUseDirectSound(); break; case ID_FILEACCESS: _ioSetFileAccess(!ioHasFileAccess()); SetAllowFileAccess(); break; case ID_IMAGEWRITE: _ioSetImageWrite(!ioCanWriteImage()); SetAllowImageWrite(); break; case ID_SHOWALLOCATIONS: fShowAllocations = !fShowAllocations; SetShowAllocations(); break; #ifndef NO_NETWORK case ID_SOCKETACCESS: _ioSetSocketAccess(!ioHasSocketAccess()); SetAllowSocketAccess(); break; case ID_DBGPRINTSOCKET: win32DebugPrintSocketState(); break; #endif case ID_DBGPRINTSTACK: printCallStack(); break; case ID_PRINTALLSTACKS: printf("Printing all processes:\n"); printAllStacks(); break; #if STACKVM case ID_DUMPPRIMLOG: { extern void dumpPrimTraceLog(void); printf("Printing recent primitives:\n"); dumpPrimTraceLog(); break; } #endif case ID_PRIORITYBOOST: fPriorityBoost = !fPriorityBoost; SetPriorityBoost(); break; case ID_USEOPENGL: fUseOpenGL = !fUseOpenGL; SetB3DXUsesOpenGL(); break; case ID_CASEFILES: printf("case files %d\n", caseSensitiveFileMode); caseSensitiveFileMode = !caseSensitiveFileMode; SetCaseSensitiveFileMode(); printf("case files %d\n", caseSensitiveFileMode); break; } }