--- previous/src/gui-osx/PrefsController.m 2018/04/24 19:27:43 1.1.1.3 +++ previous/src/gui-osx/PrefsController.m 2018/04/24 19:30:04 1.1.1.4 @@ -46,7 +46,7 @@ CNF_PARAMS CurrentParams; // Keys to be listed in the Joysticks dropdowns -SDLKey Preferences_KeysForJoysticks[] = +SDL_Keycode Preferences_KeysForJoysticks[] = { SDLK_BACKSPACE, SDLK_TAB, @@ -119,16 +119,16 @@ SDLKey Preferences_KeysForJoysticks[] = SDLK_y, SDLK_z, SDLK_DELETE, - SDLK_KP0, - SDLK_KP1, - SDLK_KP2, - SDLK_KP3, - SDLK_KP4, - SDLK_KP5, - SDLK_KP6, - SDLK_KP7, - SDLK_KP8, - SDLK_KP9, + SDLK_KP_0, + SDLK_KP_1, + SDLK_KP_2, + SDLK_KP_3, + SDLK_KP_4, + SDLK_KP_5, + SDLK_KP_6, + SDLK_KP_7, + SDLK_KP_8, + SDLK_KP_9, SDLK_KP_PERIOD, SDLK_KP_DIVIDE, SDLK_KP_MULTIPLY, @@ -160,28 +160,28 @@ SDLKey Preferences_KeysForJoysticks[] = SDLK_F13, SDLK_F14, SDLK_F15, - SDLK_NUMLOCK, + //SDLK_NUMLOCK, SDLK_CAPSLOCK, - SDLK_SCROLLOCK, + //SDLK_SCROLLOCK, SDLK_RSHIFT, SDLK_LSHIFT, SDLK_RCTRL, SDLK_LCTRL, SDLK_RALT, SDLK_LALT, - SDLK_RMETA, - SDLK_LMETA, - SDLK_LSUPER, - SDLK_RSUPER, + SDLK_RGUI, + SDLK_LGUI, + //SDLK_LSUPER, + //SDLK_RSUPER, SDLK_MODE, - SDLK_COMPOSE, + //SDLK_COMPOSE, SDLK_HELP, - SDLK_PRINT, + //SDLK_PRINT, SDLK_SYSREQ, - SDLK_BREAK, + //SDLK_BREAK, SDLK_MENU, SDLK_POWER, - SDLK_EURO, + //SDLK_EURO, SDLK_UNDO }; @@ -518,7 +518,7 @@ static const int nSoundFreqs[] = unsigned int i; for (i = 0; i < Preferences_cKeysForJoysticks; i++) { - SDLKey key = Preferences_KeysForJoysticks[i]; + SDL_Keycode key = Preferences_KeysForJoysticks[i]; const char* szKeyName = SDL_GetKeyName(key); [dropDown addItemWithTitle:[[NSString stringWithCString:szKeyName encoding:NSASCIIStringEncoding] capitalizedString]]; [[dropDown lastItem] setTag:key]; @@ -603,22 +603,22 @@ static const int nSoundFreqs[] = - (void)setAllControls { // Import the floppy paths into their controls. - IMPORT_TEXTFIELD(floppyImageA, ConfigureParams.DiskImage.szDiskFileName[0]); - IMPORT_TEXTFIELD(floppyImageB, ConfigureParams.DiskImage.szDiskFileName[1]); +// IMPORT_TEXTFIELD(floppyImageA, ConfigureParams.DiskImage.szDiskFileName[0]); +// IMPORT_TEXTFIELD(floppyImageB, ConfigureParams.DiskImage.szDiskFileName[1]); // Import all the preferences into their controls - IMPORT_SWITCH(autoInsertB, ConfigureParams.DiskImage.bAutoInsertDiskB); +// IMPORT_SWITCH(autoInsertB, ConfigureParams.DiskImage.bAutoInsertDiskB); IMPORT_SWITCH(blitter, ConfigureParams.System.bBlitter); - IMPORT_SWITCH(bootFromHD, ConfigureParams.SCSI.bBootFromHardDisk); +// IMPORT_SWITCH(bootFromHD, ConfigureParams.SCSI.bBootFromHardDisk); // IMPORT_SWITCH(captureOnChange, ConfigureParams.Screen.bCrop); // IMPORT_TEXTFIELD(cartridgeImage, ConfigureParams.Rom.szCartridgeImageFileName); IMPORT_RADIO(colorDepth, ConfigureParams.Screen.nVdiColors); IMPORT_SWITCH(compatibleCpu, ConfigureParams.System.bCompatibleCpu); IMPORT_RADIO(cpuClock, ConfigureParams.System.nCpuFreq); IMPORT_RADIO(cpuType, ConfigureParams.System.nCpuLevel); - IMPORT_TEXTFIELD(defaultImagesLocation, ConfigureParams.DiskImage.szDiskImageDirectory); +// IMPORT_TEXTFIELD(defaultImagesLocation, ConfigureParams.DiskImage.szDiskImageDirectory); IMPORT_SWITCH(enableMidi, ConfigureParams.Midi.bEnableMidi); - IMPORT_SWITCH(enablePrinter, ConfigureParams.Printer.bEnablePrinting); + IMPORT_SWITCH(enablePrinter, ConfigureParams.Printer.bPrinterConnected); IMPORT_SWITCH(enableRS232, ConfigureParams.RS232.bEnableRS232); IMPORT_SWITCH(enableSound, ConfigureParams.Sound.bEnableSound); IMPORT_DROPDOWN(frameSkip, ConfigureParams.Screen.nFrameSkips); @@ -631,12 +631,12 @@ static const int nSoundFreqs[] = // IMPORT_RADIO(ramSize, ConfigureParams.Memory.nMemorySize); IMPORT_TEXTFIELD(readRS232FromFile, ConfigureParams.RS232.szInFileName); IMPORT_SWITCH(realTime, ConfigureParams.System.bRealTimeClock); - IMPORT_SWITCH(slowFDC, ConfigureParams.DiskImage.bSlowFloppy); +// IMPORT_SWITCH(slowFDC, ConfigureParams.DiskImage.bSlowFloppy); // IMPORT_TEXTFIELD(tosImage, ConfigureParams.Rom.szTosImageFileName); IMPORT_SWITCH(useBorders, ConfigureParams.Screen.bAllowOverscan); IMPORT_SWITCH(useVDIResolution, ConfigureParams.Screen.bUseExtVdiResolutions); IMPORT_TEXTFIELD(writeMidiToFile, ConfigureParams.Midi.sMidiOutFileName); - IMPORT_RADIO(writeProtection, ConfigureParams.DiskImage.nWriteProtection); +// IMPORT_RADIO(writeProtection, ConfigureParams.DiskImage.nWriteProtection); IMPORT_TEXTFIELD(writeRS232ToFile, ConfigureParams.RS232.szOutFileName); // IMPORT_SWITCH(zoomSTLowRes, ConfigureParams.Screen.bZoomLowRes); IMPORT_SWITCH(showStatusBar, ConfigureParams.Screen.bShowStatusbar); @@ -665,8 +665,8 @@ static const int nSoundFreqs[] = for (i = 0; i <= DLGSOUND_50KHZ-DLGSOUND_11KHZ; i++) { - if (ConfigureParams.Sound.nPlaybackFreq > nSoundFreqs[i]-500 - && ConfigureParams.Sound.nPlaybackFreq < nSoundFreqs[i]+500) +// if (ConfigureParams.Sound.nPlaybackFreq > nSoundFreqs[i]-500 +// && ConfigureParams.Sound.nPlaybackFreq < nSoundFreqs[i]+500) { [playbackQuality selectCellWithTag:(i)]; break; @@ -818,18 +818,18 @@ static const int nSoundFreqs[] = - (void)saveAllControls { // Export the preference controls into their vars - EXPORT_SWITCH(autoInsertB, ConfigureParams.DiskImage.bAutoInsertDiskB); +// EXPORT_SWITCH(autoInsertB, ConfigureParams.DiskImage.bAutoInsertDiskB); EXPORT_SWITCH(blitter, ConfigureParams.System.bBlitter); - EXPORT_SWITCH(bootFromHD, ConfigureParams.SCSI.bBootFromHardDisk); +// EXPORT_SWITCH(bootFromHD, ConfigureParams.SCSI.bBootFromHardDisk); // EXPORT_SWITCH(captureOnChange, ConfigureParams.Screen.bCrop); // EXPORT_TEXTFIELD(cartridgeImage, ConfigureParams.Rom.szCartridgeImageFileName); EXPORT_RADIO(colorDepth, ConfigureParams.Screen.nVdiColors); EXPORT_SWITCH(compatibleCpu, ConfigureParams.System.bCompatibleCpu); EXPORT_RADIO(cpuClock, ConfigureParams.System.nCpuFreq); EXPORT_RADIO(cpuType, ConfigureParams.System.nCpuLevel); - EXPORT_TEXTFIELD(defaultImagesLocation, ConfigureParams.DiskImage.szDiskImageDirectory); +// EXPORT_TEXTFIELD(defaultImagesLocation, ConfigureParams.DiskImage.szDiskImageDirectory); EXPORT_SWITCH(enableMidi, ConfigureParams.Midi.bEnableMidi); - EXPORT_SWITCH(enablePrinter, ConfigureParams.Printer.bEnablePrinting); + EXPORT_SWITCH(enablePrinter, ConfigureParams.Printer.bPrinterConnected); EXPORT_SWITCH(enableRS232, ConfigureParams.RS232.bEnableRS232); EXPORT_SWITCH(enableSound, ConfigureParams.Sound.bEnableSound); EXPORT_DROPDOWN(frameSkip, ConfigureParams.Screen.nFrameSkips); @@ -842,12 +842,12 @@ static const int nSoundFreqs[] = // EXPORT_RADIO(ramSize, ConfigureParams.Memory.nMemorySize); EXPORT_TEXTFIELD(readRS232FromFile, ConfigureParams.RS232.szInFileName); EXPORT_SWITCH(realTime, ConfigureParams.System.bRealTimeClock); - EXPORT_SWITCH(slowFDC, ConfigureParams.DiskImage.bSlowFloppy); +// EXPORT_SWITCH(slowFDC, ConfigureParams.DiskImage.bSlowFloppy); // EXPORT_TEXTFIELD(tosImage, ConfigureParams.Rom.szTosImageFileName); EXPORT_SWITCH(useBorders, ConfigureParams.Screen.bAllowOverscan); EXPORT_SWITCH(useVDIResolution, ConfigureParams.Screen.bUseExtVdiResolutions); EXPORT_TEXTFIELD(writeMidiToFile, ConfigureParams.Midi.sMidiOutFileName); - EXPORT_RADIO(writeProtection, ConfigureParams.DiskImage.nWriteProtection); +// EXPORT_RADIO(writeProtection, ConfigureParams.DiskImage.nWriteProtection); EXPORT_TEXTFIELD(writeRS232ToFile, ConfigureParams.RS232.szOutFileName); // EXPORT_SWITCH(zoomSTLowRes, ConfigureParams.Screen.bZoomLowRes); EXPORT_SWITCH(showStatusBar,ConfigureParams.Screen.bShowStatusbar); @@ -862,7 +862,7 @@ static const int nSoundFreqs[] = ConfigureParams.Screen.nForceBpp = ([force8bpp state] == NSOnState) ? 8 : 0; - ConfigureParams.Sound.nPlaybackFreq = nSoundFreqs[[[playbackQuality selectedCell] tag]]; +// ConfigureParams.Sound.nPlaybackFreq = nSoundFreqs[[[playbackQuality selectedCell] tag]]; switch ([[resolution selectedCell] tag]) {