This commit is contained in:
BADIM-PC\Vadim 2017-10-20 12:52:54 +03:00
parent 5bb9e8e05d
commit 24828a9bc8
2 changed files with 13 additions and 8 deletions

View File

@ -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)

View File

@ -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)