comparison nuklear_ui/blastem_nuklear.c @ 2392:a71176b9903d

Hide cursor in fullscreen when UI is not active
author Michael Pavone <pavone@retrodev.com>
date Wed, 29 Nov 2023 23:06:50 -0800
parents ee0cc07dc406
children 34b4ff091891
comparison
equal deleted inserted replaced
2391:664c3e749428 2392:a71176b9903d
2443 } 2443 }
2444 2444
2445 void blastem_nuklear_render(void) 2445 void blastem_nuklear_render(void)
2446 { 2446 {
2447 if (current_view != view_play || (current_system && current_system->type == SYSTEM_MEDIA_PLAYER)) { 2447 if (current_view != view_play || (current_system && current_system->type == SYSTEM_MEDIA_PLAYER)) {
2448 render_force_cursor(1);
2448 nk_input_end(context); 2449 nk_input_end(context);
2449 current_view(context); 2450 current_view(context);
2450 if (fb_context) { 2451 if (fb_context) {
2451 fb_context->fb.pixels = render_get_framebuffer(FRAMEBUFFER_UI, &fb_context->fb.pitch); 2452 fb_context->fb.pixels = render_get_framebuffer(FRAMEBUFFER_UI, &fb_context->fb.pitch);
2452 nk_rawfb_render(fb_context, nk_rgb(0,0,0), 0); 2453 nk_rawfb_render(fb_context, nk_rgb(0,0,0), 0);
2455 #ifndef DISABLE_OPENGL 2456 #ifndef DISABLE_OPENGL
2456 nk_sdl_render(NK_ANTI_ALIASING_ON, 512 * 1024, 128 * 1024); 2457 nk_sdl_render(NK_ANTI_ALIASING_ON, 512 * 1024, 128 * 1024);
2457 #endif 2458 #endif
2458 } 2459 }
2459 nk_input_begin(context); 2460 nk_input_begin(context);
2461 } else {
2462 render_force_cursor(0);
2460 } 2463 }
2461 } 2464 }
2462 2465
2463 void ui_idle_loop(void) 2466 void ui_idle_loop(void)
2464 { 2467 {