Don't show mouse if we don't use it for input.

This commit is contained in:
František Jahoda 2018-01-05 23:22:23 +01:00
parent 173fe4167b
commit efadc1fe65
2 changed files with 13 additions and 9 deletions

View File

@ -2300,8 +2300,12 @@ static void blitCursor(const u8* in)
static void renderCursor() static void renderCursor()
{ {
if(studio.mode == TIC_RUN_MODE && if(studio.mode == TIC_RUN_MODE && !studio.tic->input.mouse)
studio.tic->ram.vram.vars.cursor) {
SDL_ShowCursor(SDL_DISABLE);
return;
}
if(studio.mode == TIC_RUN_MODE && studio.tic->ram.vram.vars.cursor)
{ {
SDL_ShowCursor(SDL_DISABLE); SDL_ShowCursor(SDL_DISABLE);
blitCursor(studio.tic->ram.sprites.data[studio.tic->ram.vram.vars.cursor].data); blitCursor(studio.tic->ram.sprites.data[studio.tic->ram.vram.vars.cursor].data);

View File

@ -1577,7 +1577,7 @@ static void api_tick(tic_mem* tic, tic_tick_data* data)
tic->input.gamepad = 1; tic->input.gamepad = 1;
else if(compareMetatag(code, "input", "keyboard", config->singleComment)) else if(compareMetatag(code, "input", "keyboard", config->singleComment))
tic->input.keyboard = 1; tic->input.keyboard = 1;
else tic->input.data = -1; else tic->input.data = -1; // default is all enabled
data->start = data->counter(); data->start = data->counter();