all repos — mgba @ b5c813e829ffa88e7027ff28aa276e45d8bced62

mGBA Game Boy Advance Emulator

Vita: Update to latest SDK version
Sergi Granell xerpi.g.12@gmail.com
Sat, 23 Jan 2016 12:27:42 +0100
commit

b5c813e829ffa88e7027ff28aa276e45d8bced62

parent

380f6dbe7e42dc3c67eee39cccb226c13d9b9a05

M src/platform/psp2/main.csrc/platform/psp2/main.c

@@ -22,8 +22,6 @@ #include <psp2/touch.h>

#include <vita2d.h> -PSP2_MODULE_INFO(0, 0, "mGBA"); - static void _drawStart(void) { vita2d_set_vblank_wait(false); vita2d_start_drawing();

@@ -43,29 +41,29 @@ static uint32_t _pollInput(void) {

SceCtrlData pad; sceCtrlPeekBufferPositive(0, &pad, 1); int input = 0; - if (pad.buttons & PSP2_CTRL_TRIANGLE) { + if (pad.buttons & SCE_CTRL_TRIANGLE) { input |= 1 << GUI_INPUT_CANCEL; } - if (pad.buttons & PSP2_CTRL_SQUARE) { + if (pad.buttons & SCE_CTRL_SQUARE) { input |= 1 << GBA_GUI_INPUT_SCREEN_MODE; } - if (pad.buttons & PSP2_CTRL_CIRCLE) { + if (pad.buttons & SCE_CTRL_CIRCLE) { input |= 1 << GUI_INPUT_BACK; } - if (pad.buttons & PSP2_CTRL_CROSS) { + if (pad.buttons & SCE_CTRL_CROSS) { input |= 1 << GUI_INPUT_SELECT; } - if (pad.buttons & PSP2_CTRL_UP || pad.ly < 64) { + if (pad.buttons & SCE_CTRL_UP || pad.ly < 64) { input |= 1 << GUI_INPUT_UP; } - if (pad.buttons & PSP2_CTRL_DOWN || pad.ly >= 192) { + if (pad.buttons & SCE_CTRL_DOWN || pad.ly >= 192) { input |= 1 << GUI_INPUT_DOWN; } - if (pad.buttons & PSP2_CTRL_LEFT || pad.lx < 64) { + if (pad.buttons & SCE_CTRL_LEFT || pad.lx < 64) { input |= 1 << GUI_INPUT_LEFT; } - if (pad.buttons & PSP2_CTRL_RIGHT || pad.lx >= 192) { + if (pad.buttons & SCE_CTRL_RIGHT || pad.lx >= 192) { input |= 1 << GUI_INPUT_RIGHT; }

@@ -108,7 +106,7 @@

GUI_PARAMS_TRAIL }, .configExtra = (struct GUIMenuItem[]) { - { + { .title = "Screen mode", .data = "screenMode", .submenu = 0,
M src/platform/psp2/psp2-context.csrc/platform/psp2/psp2-context.c

@@ -65,7 +65,7 @@

static THREAD_ENTRY _audioThread(void* context) { struct GBAPSP2AudioContext* audio = (struct GBAPSP2AudioContext*) context; struct GBAStereoSample buffer[PSP2_SAMPLES]; - int audioPort = sceAudioOutOpenPort(PSP2_AUDIO_OUT_PORT_TYPE_MAIN, PSP2_SAMPLES, 48000, PSP2_AUDIO_OUT_MODE_STEREO); + int audioPort = sceAudioOutOpenPort(SCE_AUDIO_OUT_PORT_TYPE_MAIN, PSP2_SAMPLES, 48000, SCE_AUDIO_OUT_MODE_STEREO); while (audio->running) { memset(buffer, 0, sizeof(buffer)); MutexLock(&audio->mutex);

@@ -75,7 +75,7 @@ if (len > PSP2_SAMPLES) {

len = PSP2_SAMPLES; } if (len > 0) { - len &= ~(PSP2_AUDIO_MIN_LEN - 1); + len &= ~(SCE_AUDIO_MIN_LEN - 1); CircleBufferRead(&audio->buffer, buffer, len * sizeof(buffer[0])); MutexUnlock(&audio->mutex); sceAudioOutOutput(audioPort, buffer);

@@ -137,16 +137,16 @@ }

void GBAPSP2Setup(struct GBAGUIRunner* runner) { scePowerSetArmClockFrequency(80); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_CROSS, GBA_KEY_A); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_CIRCLE, GBA_KEY_B); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_START, GBA_KEY_START); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_SELECT, GBA_KEY_SELECT); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_UP, GBA_KEY_UP); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_DOWN, GBA_KEY_DOWN); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_LEFT, GBA_KEY_LEFT); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_RIGHT, GBA_KEY_RIGHT); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_LTRIGGER, GBA_KEY_L); - _mapVitaKey(&runner->context.inputMap, PSP2_CTRL_RTRIGGER, GBA_KEY_R); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_CROSS, GBA_KEY_A); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_CIRCLE, GBA_KEY_B); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_START, GBA_KEY_START); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_SELECT, GBA_KEY_SELECT); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_UP, GBA_KEY_UP); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_DOWN, GBA_KEY_DOWN); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_LEFT, GBA_KEY_LEFT); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_RIGHT, GBA_KEY_RIGHT); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_LTRIGGER, GBA_KEY_L); + _mapVitaKey(&runner->context.inputMap, SCE_CTRL_RTRIGGER, GBA_KEY_R); struct GBAAxis desc = { GBA_KEY_DOWN, GBA_KEY_UP, 192, 64 }; GBAInputBindAxis(&runner->context.inputMap, PSP2_INPUT, 0, &desc);
M src/platform/psp2/sce-vfs.csrc/platform/psp2/sce-vfs.c

@@ -222,7 +222,7 @@ }

static enum VFSType _vdesceType(struct VDirEntry* vde) { struct VDirEntrySce* vdesce = (struct VDirEntrySce*) vde; - if (PSP2_S_ISDIR(vdesce->ent.d_stat.st_mode)) { + if (SCE_S_ISDIR(vdesce->ent.d_stat.st_mode)) { return VFS_DIRECTORY; } return VFS_FILE;
M src/util/vfs.csrc/util/vfs.c

@@ -40,27 +40,27 @@ break;

} return VFileFOpen(path, chflags); #elif defined(PSP2) - int sceFlags = PSP2_O_RDONLY; + int sceFlags = SCE_O_RDONLY; switch (flags & O_ACCMODE) { case O_WRONLY: - sceFlags = PSP2_O_WRONLY; + sceFlags = SCE_O_WRONLY; break; case O_RDWR: - sceFlags = PSP2_O_RDWR; + sceFlags = SCE_O_RDWR; break; case O_RDONLY: - sceFlags = PSP2_O_RDONLY; + sceFlags = SCE_O_RDONLY; break; } if (flags & O_APPEND) { - sceFlags |= PSP2_O_APPEND; + sceFlags |= SCE_O_APPEND; } if (flags & O_TRUNC) { - sceFlags |= PSP2_O_TRUNC; + sceFlags |= SCE_O_TRUNC; } if (flags & O_CREAT) { - sceFlags |= PSP2_O_CREAT; + sceFlags |= SCE_O_CREAT; } return VFileOpenSce(path, sceFlags, 0666); #elif defined(USE_VFS_3DS)