Ticket #8840: dsscalepatch.diff
File dsscalepatch.diff, 6.5 KB (added by , 16 years ago) |
---|
-
backends/platform/ds/arm9/source/dsmain.cpp
213 213 int gameHeight = 200; 214 214 215 215 // Scale 216 bool twoHundredPercentFixedScale = false;216 scaleSize fixedScaleSize = SCALESIZE_DYNAMIC; 217 217 bool cpuScalerEnable = false; 218 218 #define NUM_SUPPORTED_GAMES 20 219 219 … … 481 481 touchYOffset = y; 482 482 } 483 483 484 void set 200PercentFixedScale(bool on) {485 twoHundredPercentFixedScale = on;484 void setScaleSize(scaleSize size) { 485 fixedScaleSize = size; 486 486 } 487 487 488 488 void setUnscaledMode(bool enable) { … … 1854 1854 int yCenter = subScTargetY + ((subScreenHeight >> 1) << 8); 1855 1855 1856 1856 1857 if (twoHundredPercentFixedScale) { 1857 if (fixedScaleSize == SCALESIZE_FIXED100) { 1858 subScreenWidth = 256; 1859 subScreenHeight = 192; 1860 } else if (fixedScaleSize == SCALESIZE_FIXED200) { 1858 1861 subScreenWidth = 256 >> 1; 1859 1862 subScreenHeight = 192 >> 1; 1860 1863 } else { -
backends/platform/ds/arm9/source/dsmain.h
30 30 31 31 namespace DS { 32 32 33 enum scaleSize { 34 SCALESIZE_DYNAMIC = 0, SCALESIZE_FIXED100, SCALESIZE_FIXED200, SCALESIZE_NUM_MODES 35 }; 33 36 34 37 enum controlType { 35 38 CONT_SCUMM_ORIGINAL, … … 80 83 81 84 void setTalkPos(int x, int y); 82 85 void setTopScreenTarget(int x, int y); 83 void set 200PercentFixedScale(bool on);86 void setScaleSize(scaleSize size); 84 87 85 88 // Timers 86 89 void setTimerCallback(OSystem_DS::TimerProc proc, int interval); // Setup a callback function at a regular interval -
backends/platform/ds/arm9/source/dsoptions.cpp
54 54 55 55 new GUI::StaticTextWidget(this, 90, 10, 130, 15, "ScummVM DS Options", GUI::kTextAlignCenter); 56 56 57 _leftHandedCheckbox = new GUI::CheckboxWidget(this, 5, 70, 130, 20, "Left handed mode", 0, 'L');57 _leftHandedCheckbox = new GUI::CheckboxWidget(this, 5, 85, 130, 20, "Left handed mode", 0, 'L'); 58 58 _indyFightCheckbox = new GUI::CheckboxWidget(this, 5, 40, 200, 20, "Indy fighting controls", 0, 'I'); 59 _twoHundredPercentCheckbox = new GUI::CheckboxWidget(this, 5, 55, 230, 20, "Zoomed screen at fixed 200% zoom", 0, 'T'); 59 60 _dynamicZoomCheckbox = new GUI::CheckboxWidget(this, 5, 55, 100, 20, "Dynamic Zoom", 0x20000003, 'T'); 61 _oneHundredPercentCheckbox = new GUI::CheckboxWidget(this, 105, 55, 90, 20, "Zoom 100%", 0x20000001, 'T'); 62 _twoHundredPercentCheckbox = new GUI::CheckboxWidget(this, 195, 55, 90, 20, "Zoom 200%", 0x20000002, 'T'); 63 60 64 _highQualityAudioCheckbox = new GUI::CheckboxWidget(this, 5, 25, 250, 20, "High quality audio (slower) (reboot)", 0, 'T'); 61 _disablePowerOff = new GUI::CheckboxWidget(this, 5, 85, 130, 20, "Disable power off", 0, 'T');62 _showCursorCheckbox = new GUI::CheckboxWidget(this, 5, 1 00, 130, 20, "Show mouse cursor", 0, 'T');65 _disablePowerOff = new GUI::CheckboxWidget(this, 5, 100, 130, 20, "Disable power off", 0, 'T'); 66 _showCursorCheckbox = new GUI::CheckboxWidget(this, 5, 130, 130, 20, "Show mouse cursor", 0, 'T'); 63 67 64 68 //#ifdef ALLOW_CPU_SCALER 65 69 // _cpuScaler = new GUI::CheckboxWidget(this, 160, 115, 90, 20, "CPU scaler", 0, 'T'); … … 125 129 _unscaledCheckbox->setState(false); 126 130 } 127 131 128 if (ConfMan.hasKey("twohundredpercent", "ds")) { 129 _twoHundredPercentCheckbox->setState(ConfMan.getBool("twohundredpercent", "ds")); 132 if (ConfMan.hasKey("scalesize", "ds")) { 133 int scalesize = ConfMan.getInt("scalesize", "ds"); 134 _twoHundredPercentCheckbox->setState(scalesize == (int)SCALESIZE_FIXED200); 135 _oneHundredPercentCheckbox->setState(scalesize == (int)SCALESIZE_FIXED100); 136 _dynamicZoomCheckbox->setState((scalesize != (int)SCALESIZE_FIXED100)&&(scalesize != (int)SCALESIZE_FIXED200)); 130 137 } else { 131 138 _twoHundredPercentCheckbox->setState(false); 139 _oneHundredPercentCheckbox->setState(false); 140 _dynamicZoomCheckbox->setState(true); 132 141 } 133 142 134 143 if (ConfMan.hasKey("22khzaudio", "ds")) { … … 180 189 void DSOptionsDialog::updateConfigManager() { 181 190 ConfMan.setBool("lefthanded", _leftHandedCheckbox->getState(), "ds"); 182 191 ConfMan.setBool("unscaled", _unscaledCheckbox->getState(), "ds"); 183 ConfMan.setBool("twohundredpercent", _twoHundredPercentCheckbox->getState(), "ds"); 192 193 if (_twoHundredPercentCheckbox->getState()) { 194 ConfMan.setInt("scalesize", (int)SCALESIZE_FIXED200, "ds"); 195 } else if (_oneHundredPercentCheckbox->getState()) { 196 ConfMan.setInt("scalesize", (int)SCALESIZE_FIXED100, "ds"); 197 } else { 198 ConfMan.setInt("scalesize", (int)SCALESIZE_DYNAMIC, "ds"); 199 } 200 184 201 ConfMan.setBool("22khzaudio", _highQualityAudioCheckbox->getState(), "ds"); 185 202 ConfMan.setBool("disablepoweroff", _disablePowerOff->getState(), "ds"); 186 203 #ifdef ALLOW_CPU_SCALER … … 222 239 _unscaledCheckbox->setState(true); 223 240 } 224 241 } 242 else if ((cmd & 0xFF000000) == 0x20000000) 243 { 244 _dynamicZoomCheckbox->setState((sender == _dynamicZoomCheckbox) && (cmd == 0x20000003)); 245 _oneHundredPercentCheckbox->setState((sender == _oneHundredPercentCheckbox) && (cmd == 0x20000001)); 246 _twoHundredPercentCheckbox->setState((sender == _twoHundredPercentCheckbox) && (cmd == 0x20000002)); 247 } 225 248 226 249 guard = false; 227 250 … … 327 350 DS::setUnscaledMode(false); 328 351 } 329 352 330 if (ConfMan.hasKey(" twohundredpercent", "ds")) {331 DS::set 200PercentFixedScale(ConfMan.getBool("twohundredpercent", "ds"));353 if (ConfMan.hasKey("scalesize", "ds")) { 354 DS::setScaleSize((scaleSize)ConfMan.getInt("scalesize", "ds")); 332 355 } else { 333 DS::set 200PercentFixedScale(false);356 DS::setScaleSize(SCALESIZE_DYNAMIC); 334 357 } 335 358 336 359 if (ConfMan.hasKey("xoffset", "ds")) { -
backends/platform/ds/arm9/source/dsoptions.h
50 50 GUI::CheckboxWidget* _leftHandedCheckbox; 51 51 GUI::CheckboxWidget* _unscaledCheckbox; 52 52 GUI::CheckboxWidget* _twoHundredPercentCheckbox; 53 GUI::CheckboxWidget* _oneHundredPercentCheckbox; 54 GUI::CheckboxWidget* _dynamicZoomCheckbox; 53 55 GUI::CheckboxWidget* _indyFightCheckbox; 54 56 GUI::CheckboxWidget* _highQualityAudioCheckbox; 55 57 GUI::CheckboxWidget* _disablePowerOff;