all repos — mgba @ 6c1daa914b029bcf8fcbbb5bb22af4b376982f5d

mGBA Game Boy Advance Emulator

SDL, GB Video: Fix some warnings
Jeffrey Pfau jeffrey@endrift.com
Fri, 26 Feb 2016 01:03:12 -0800
commit

6c1daa914b029bcf8fcbbb5bb22af4b376982f5d

parent

12f9dd1782a1630c65479d9aee2fc865dab2db3b

3 files changed, 12 insertions(+), 14 deletions(-)

jump to
M src/gb/renderers/software.csrc/gb/renderers/software.c

@@ -297,7 +297,7 @@ }

if (GBRegisterLCDCIsObjSize(renderer->lcdc) && obj->tile & 1) { --tileOffset; } - uint8_t mask = GBObjAttributesIsPriority(obj->attr) ? ~0x1C : ~0x9F; + uint8_t mask = GBObjAttributesIsPriority(obj->attr) ? 0xE3 : 0x60; uint8_t mask2 = GBObjAttributesIsPriority(obj->attr) ? 0 : 0x83; int p; if (renderer->model >= GB_MODEL_CGB) {
M src/platform/sdl/main.csrc/platform/sdl/main.c

@@ -75,22 +75,20 @@ freeArguments(&args);

return 0; } - if (args.fname) { - renderer.core = mCoreFind(args.fname); - if (!renderer.core) { - printf("Could not run game. Are you sure the file exists and is a compatible game?\n"); - freeArguments(&args); - return 1; - } - renderer.core->desiredVideoDimensions(renderer.core, &renderer.width, &renderer.height); + renderer.core = mCoreFind(args.fname); + if (!renderer.core) { + printf("Could not run game. Are you sure the file exists and is a compatible game?\n"); + freeArguments(&args); + return 1; + } + renderer.core->desiredVideoDimensions(renderer.core, &renderer.width, &renderer.height); #ifdef BUILD_GL - mSDLGLCreate(&renderer); + mSDLGLCreate(&renderer); #elif defined(BUILD_GLES2) || defined(USE_EPOXY) - mSDLGLES2Create(&renderer); + mSDLGLES2Create(&renderer); #else - mSDLSWCreate(&renderer); + mSDLSWCreate(&renderer); #endif - } renderer.ratio = graphicsOpts.multiplier; if (renderer.ratio == 0) {
M src/platform/sdl/sdl-audio.csrc/platform/sdl/sdl-audio.c

@@ -93,7 +93,7 @@ return;

} blip_t* left = NULL; blip_t* right = NULL; - int32_t clockRate; + int32_t clockRate = GBA_ARM7TDMI_FREQUENCY; if (audioContext->core) { left = audioContext->core->getAudioChannel(audioContext->core, 0); right = audioContext->core->getAudioChannel(audioContext->core, 1);