all repos — mgba @ 94ffa0d2d7fbf71d1cb7f14373482a810e5785c2

mGBA Game Boy Advance Emulator

All: Minor cleanup
Jeffrey Pfau jeffrey@endrift.com
Thu, 17 Sep 2015 19:50:40 -0700
commit

94ffa0d2d7fbf71d1cb7f14373482a810e5785c2

parent

04b6cf5e4c6582051049b45f81333d24b894418b

3 files changed, 13 insertions(+), 5 deletions(-)

jump to
M src/gba/gui/gui-runner.csrc/gba/gui/gui-runner.c

@@ -14,12 +14,18 @@ #include "util/memory.h"

#include "util/png-io.h" #include "util/vfs.h" +#include <sys/time.h> + +#define FPS_GRANULARITY 120 +#define FPS_BUFFER_SIZE 3 + enum { RUNNER_CONTINUE = 1, - RUNNER_EXIT = 2, - RUNNER_SAVE_STATE = 3, - RUNNER_LOAD_STATE = 4, - RUNNER_SCREENSHOT = 5, + RUNNER_EXIT, + RUNNER_SAVE_STATE, + RUNNER_LOAD_STATE, + RUNNER_SCREENSHOT, + RUNNER_CONFIG, RUNNER_COMMAND_MASK = 0xFFFF, RUNNER_STATE_1 = 0x10000,
M src/platform/3ds/main.csrc/platform/3ds/main.c

@@ -26,7 +26,7 @@ SM_PA_TOP,

SM_AF_TOP, SM_SF_TOP, SM_MAX -} screenMode = SM_PA_BOTTOM; +} screenMode = SM_PA_TOP; #define AUDIO_SAMPLES 0x80 #define AUDIO_SAMPLE_BUFFER (AUDIO_SAMPLES * 24)
M src/platform/psp2/psp2-context.csrc/platform/psp2/psp2-context.c

@@ -229,6 +229,7 @@ void GBAPSP2Draw(struct GBAGUIRunner* runner, bool faded) {

UNUSED(runner); switch (screenMode) { case SM_BACKDROP: + default: vita2d_draw_texture_tint(backdrop, 0, 0, (faded ? 0 : 0xC0000000) | 0x3FFFFFFF); // Fall through case SM_PLAIN:

@@ -249,6 +250,7 @@ memcpy(&texpixels[256 * y], &pixels[VIDEO_HORIZONTAL_PIXELS * y], VIDEO_HORIZONTAL_PIXELS * 4);

} switch (screenMode) { case SM_BACKDROP: + default: vita2d_draw_texture_tint(backdrop, 0, 0, (faded ? 0 : 0xC0000000) | 0x3FFFFFFF); // Fall through case SM_PLAIN: