diff --git a/src/surf.c b/src/surf.c index 4b063d5..391cade 100644 --- a/src/surf.c +++ b/src/surf.c @@ -762,14 +762,16 @@ static void tick(Surf* surf) tic->api.clear(tic, TIC_COLOR_BG); drawBG(surf); - processAnim(surf); - if(surf->state == &MenuModeState) + if(surf->menu.count > 0) { - processGamepad(surf); - } + processAnim(surf); + + if(surf->state == &MenuModeState) + { + processGamepad(surf); + } - { loadCover(surf); drawCover(surf, surf->menu.pos, 0, 0); @@ -782,6 +784,12 @@ static void tick(Surf* surf) drawTopToolbar(surf, 0, AnimVar.topBarY - MENU_HEIGHT); drawBottomToolbar(surf, 0, TIC80_HEIGHT - AnimVar.bottomBarY); } + else + { + static const char Label[] = "You don't have any files..."; + s32 size = tic->api.text(tic, Label, 0, -TIC_FONT_HEIGHT, tic_color_white); + tic->api.text(tic, Label, (TIC80_WIDTH - size) / 2, (TIC80_HEIGHT - TIC_FONT_HEIGHT)/2, tic_color_white); + } } static void resume(Surf* surf) diff --git a/src/tic.c b/src/tic.c index 9d52cbc..1baa31f 100644 --- a/src/tic.c +++ b/src/tic.c @@ -440,9 +440,6 @@ static void api_pause(tic_mem* memory) memcpy(&machine->pause.registers, &memory->ram.registers, sizeof memory->ram.registers); memcpy(&machine->pause.music_pos, &memory->ram.music_pos, sizeof memory->ram.music_pos); memcpy(&machine->pause.vram, &memory->ram.vram, sizeof memory->ram.vram); - - // api_reset(memory); - // memcpy(memory->ram.vram.palette.data, memory->config.palette.data, sizeof(tic_palette)); } static void api_resume(tic_mem* memory)