mirror of https://github.com/mgba-emu/mgba.git
GUI, 3DS: Fix some warnings
This commit is contained in:
parent
11d9b492cd
commit
03d97baeec
|
@ -22,6 +22,8 @@
|
||||||
#include <3ds/types.h>
|
#include <3ds/types.h>
|
||||||
#include <3ds/svc.h>
|
#include <3ds/svc.h>
|
||||||
|
|
||||||
|
#include "util/common.h"
|
||||||
|
|
||||||
extern char* fake_heap_start;
|
extern char* fake_heap_start;
|
||||||
extern char* fake_heap_end;
|
extern char* fake_heap_end;
|
||||||
u32 __linear_heap;
|
u32 __linear_heap;
|
||||||
|
@ -69,6 +71,8 @@ void __system_allocateHeaps() {
|
||||||
|
|
||||||
void __attribute__((noreturn)) __libctru_exit(int rc)
|
void __attribute__((noreturn)) __libctru_exit(int rc)
|
||||||
{
|
{
|
||||||
|
UNUSED(rc);
|
||||||
|
|
||||||
u32 tmp=0;
|
u32 tmp=0;
|
||||||
|
|
||||||
// Unmap the linear heap
|
// Unmap the linear heap
|
||||||
|
|
|
@ -122,6 +122,7 @@ static void _drawTex(bool faded) {
|
||||||
sf2d_draw_texture_scale_blend(tex, 80, 296, 1, -1, 0xFFFFFF3F | (faded ? 0 : 0xC0));
|
sf2d_draw_texture_scale_blend(tex, 80, 296, 1, -1, 0xFFFFFF3F | (faded ? 0 : 0xC0));
|
||||||
break;
|
break;
|
||||||
case SM_PA_BOTTOM:
|
case SM_PA_BOTTOM:
|
||||||
|
default:
|
||||||
sf2d_draw_texture_scale_blend(tex, 40, 296, 1, -1, 0xFFFFFF3F | (faded ? 0 : 0xC0));
|
sf2d_draw_texture_scale_blend(tex, 40, 296, 1, -1, 0xFFFFFF3F | (faded ? 0 : 0xC0));
|
||||||
break;
|
break;
|
||||||
case SM_AF_TOP:
|
case SM_AF_TOP:
|
||||||
|
@ -141,8 +142,8 @@ static void _drawTex(bool faded) {
|
||||||
|
|
||||||
static void _drawFrame(struct GBAGUIRunner* runner, bool faded) {
|
static void _drawFrame(struct GBAGUIRunner* runner, bool faded) {
|
||||||
UNUSED(runner);
|
UNUSED(runner);
|
||||||
GSPGPU_FlushDataCache(0, renderer.outputBuffer, 256 * VIDEO_VERTICAL_PIXELS * 2);
|
GSPGPU_FlushDataCache(0, (u8*) renderer.outputBuffer, 256 * VIDEO_VERTICAL_PIXELS * 2);
|
||||||
GX_SetDisplayTransfer(0, renderer.outputBuffer, GX_BUFFER_DIM(256, VIDEO_VERTICAL_PIXELS), tex->data, GX_BUFFER_DIM(256, VIDEO_VERTICAL_PIXELS), 0x000002202);
|
GX_SetDisplayTransfer(0, (u32*) renderer.outputBuffer, GX_BUFFER_DIM(256, VIDEO_VERTICAL_PIXELS), tex->data, GX_BUFFER_DIM(256, VIDEO_VERTICAL_PIXELS), 0x000002202);
|
||||||
_drawTex(faded);
|
_drawTex(faded);
|
||||||
#if RESAMPLE_LIBRARY == RESAMPLE_BLIP_BUF
|
#if RESAMPLE_LIBRARY == RESAMPLE_BLIP_BUF
|
||||||
if (!hasSound) {
|
if (!hasSound) {
|
||||||
|
@ -173,6 +174,7 @@ static void _drawScreenshot(struct GBAGUIRunner* runner, const uint32_t* pixels,
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint16_t _pollGameInput(struct GBAGUIRunner* runner) {
|
static uint16_t _pollGameInput(struct GBAGUIRunner* runner) {
|
||||||
|
UNUSED(runner);
|
||||||
hidScanInput();
|
hidScanInput();
|
||||||
uint32_t activeKeys = hidKeysHeld() & 0xF00003FF;
|
uint32_t activeKeys = hidKeysHeld() & 0xF00003FF;
|
||||||
activeKeys |= activeKeys >> 24;
|
activeKeys |= activeKeys >> 24;
|
||||||
|
|
|
@ -74,7 +74,7 @@ static bool _refreshDirectory(struct GUIParams* params, const char* currentPath,
|
||||||
params->guiPrepare();
|
params->guiPrepare();
|
||||||
}
|
}
|
||||||
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font), GUI_TEXT_LEFT, 0xFFFFFFFF, "%s", currentPath);
|
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font), GUI_TEXT_LEFT, 0xFFFFFFFF, "%s", currentPath);
|
||||||
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning for items: %lu)", i);
|
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning for items: %zu)", i);
|
||||||
if (params->guiFinish) {
|
if (params->guiFinish) {
|
||||||
params->guiFinish();
|
params->guiFinish();
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ static bool _refreshDirectory(struct GUIParams* params, const char* currentPath,
|
||||||
params->guiPrepare();
|
params->guiPrepare();
|
||||||
}
|
}
|
||||||
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font), GUI_TEXT_LEFT, 0xFFFFFFFF, "%s", currentPath);
|
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font), GUI_TEXT_LEFT, 0xFFFFFFFF, "%s", currentPath);
|
||||||
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning item %lu of %lu)", i, items);
|
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning item %zu of %zu)", i, items);
|
||||||
if (params->guiFinish) {
|
if (params->guiFinish) {
|
||||||
params->guiFinish();
|
params->guiFinish();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue