diff options
author | Max Horn | 2009-09-30 16:16:53 +0000 |
---|---|---|
committer | Max Horn | 2009-09-30 16:16:53 +0000 |
commit | 8ba75fc522f16844524dd4d6f88c3851e2402969 (patch) | |
tree | df25c20389e3e706d508f37914dedc73c6479f00 /backends/platform/psp | |
parent | 25dde91c7c6c7da52636e3daa34bd9eee5d9dcb9 (diff) | |
download | scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.tar.gz scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.tar.bz2 scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.zip |
Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
svn-id: r44495
Diffstat (limited to 'backends/platform/psp')
-rw-r--r-- | backends/platform/psp/osys_psp.cpp | 106 | ||||
-rw-r--r-- | backends/platform/psp/psp_main.cpp | 3 |
2 files changed, 54 insertions, 55 deletions
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 16f35f971f..960f135499 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -617,19 +617,19 @@ void OSystem_PSP::updateScreen() { sceGuDisable(GU_ALPHA_TEST); sceGuEnable(GU_BLEND); sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0); - switch(_keyboardMode) { - case 0: - sceGuTexImage(0, 512, 512, 480, keyboard_letters); - break; - case CAPS_LOCK: - sceGuTexImage(0, 512, 512, 480, keyboard_letters_shift); - break; - case SYMBOLS: - sceGuTexImage(0, 512, 512, 480, keyboard_symbols); - break; - case (CAPS_LOCK | SYMBOLS): - sceGuTexImage(0, 512, 512, 480, keyboard_symbols_shift); - break; + switch (_keyboardMode) { + case 0: + sceGuTexImage(0, 512, 512, 480, keyboard_letters); + break; + case CAPS_LOCK: + sceGuTexImage(0, 512, 512, 480, keyboard_letters_shift); + break; + case SYMBOLS: + sceGuTexImage(0, 512, 512, 480, keyboard_symbols); + break; + case (CAPS_LOCK | SYMBOLS): + sceGuTexImage(0, 512, 512, 480, keyboard_symbols_shift); + break; } sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); @@ -1006,50 +1006,50 @@ bool OSystem_PSP::pollEvent(Common::Event &event) { event.type = (pad.Buttons & PSP_CTRL_CROSS) ? Common::EVENT_KEYDOWN : Common::EVENT_KEYUP; if (_keySelected > 26) { event.kbd.flags = 0; - switch(_keySelected) { - case 27: - event.kbd.ascii = ' '; - event.kbd.keycode = Common::KEYCODE_SPACE; - break; - case 28: - event.kbd.ascii = 127; - event.kbd.keycode = Common::KEYCODE_DELETE; + switch (_keySelected) { + case 27: + event.kbd.ascii = ' '; + event.kbd.keycode = Common::KEYCODE_SPACE; + break; + case 28: + event.kbd.ascii = 127; + event.kbd.keycode = Common::KEYCODE_DELETE; + break; + case 29: + event.kbd.ascii = 8; + event.kbd.keycode = Common::KEYCODE_BACKSPACE; + break; + case 30: + event.kbd.ascii = 13; + event.kbd.keycode = Common::KEYCODE_RETURN; + break; + } + } else { + switch ( _keyboardMode) { + case 0: + event.kbd.flags = 0; + event.kbd.ascii = 'a'+_keySelected-1; + event.kbd.keycode = (Common::KeyCode)(Common::KEYCODE_a + _keySelected-1); break; - case 29: - event.kbd.ascii = 8; - event.kbd.keycode = Common::KEYCODE_BACKSPACE; + case CAPS_LOCK: + event.kbd.ascii = 'A'+_keySelected-1; + event.kbd.keycode = (Common::KeyCode)(Common::KEYCODE_a + _keySelected-1); + event.kbd.flags = Common::KBD_SHIFT; break; - case 30: - event.kbd.ascii = 13; - event.kbd.keycode = Common::KEYCODE_RETURN; + case SYMBOLS: + if (_keySelected < 21) { + event.kbd.flags = 0; + event.kbd.ascii = kbd_ascii[_keySelected-1]; + event.kbd.keycode = kbd_code[ _keySelected-1]; + } break; - } - } else { - switch( _keyboardMode) { - case 0: + case (SYMBOLS|CAPS_LOCK): + if (_keySelected < 21) { event.kbd.flags = 0; - event.kbd.ascii = 'a'+_keySelected-1; - event.kbd.keycode = (Common::KeyCode)(Common::KEYCODE_a + _keySelected-1); - break; - case CAPS_LOCK: - event.kbd.ascii = 'A'+_keySelected-1; - event.kbd.keycode = (Common::KeyCode)(Common::KEYCODE_a + _keySelected-1); - event.kbd.flags = Common::KBD_SHIFT; - break; - case SYMBOLS: - if (_keySelected < 21) { - event.kbd.flags = 0; - event.kbd.ascii = kbd_ascii[_keySelected-1]; - event.kbd.keycode = kbd_code[ _keySelected-1]; - } - break; - case (SYMBOLS|CAPS_LOCK): - if (_keySelected < 21) { - event.kbd.flags = 0; - event.kbd.ascii = kbd_ascii_cl[_keySelected-1]; - event.kbd.keycode = kbd_code_cl[ _keySelected-1]; - } - break; + event.kbd.ascii = kbd_ascii_cl[_keySelected-1]; + event.kbd.keycode = kbd_code_cl[ _keySelected-1]; + } + break; } } _prevButtons = pad.Buttons; diff --git a/backends/platform/psp/psp_main.cpp b/backends/platform/psp/psp_main.cpp index 74363e4ac9..1f33e0add0 100644 --- a/backends/platform/psp/psp_main.cpp +++ b/backends/platform/psp/psp_main.cpp @@ -23,7 +23,6 @@ * */ - #define USERSPACE_ONLY //don't use kernel mode features #ifndef USERSPACE_ONLY @@ -118,7 +117,7 @@ int CallbackThread(SceSize /*size*/, void *arg) { cbid = sceKernelCreateCallback("Power Callback", (SceKernelCallbackFunction)power_callback, 0); if (cbid >= 0) { - if(scePowerRegisterCallback(-1, cbid) < 0) { + if (scePowerRegisterCallback(-1, cbid) < 0) { PSPDebugTrace("SetupCallbacks(): Couldn't register callback for power_callback\n"); } } else { |