X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2Fplat.c;h=a2b839449d7daad44c099b792d6439f11d1214e3;hb=e31266dd116b6bea59ce3f2036feeb6725c45a72;hp=16fa183e2a3253d57e3936a3965816acda0eff06;hpb=bf3c44f4850c0804e0bf63964c1291b18549d996;p=libpicofe.git diff --git a/gp2x/plat.c b/gp2x/plat.c index 16fa183..a2b8394 100644 --- a/gp2x/plat.c +++ b/gp2x/plat.c @@ -4,6 +4,7 @@ #include "../common/plat.h" #include "../common/readpng.h" #include "../common/menu.h" +#include "../common/emu.h" void plat_video_menu_enter(int is_rom_loaded) @@ -11,18 +12,18 @@ void plat_video_menu_enter(int is_rom_loaded) if (is_rom_loaded) { // darken the active framebuffer - memset(gp2x_screen, 0, 320*8*2); - menu_darken_bg((char *)gp2x_screen + 320*8*2, 320*224, 1); - memset((char *)gp2x_screen + 320*232*2, 0, 320*8*2); + memset(g_screen_ptr, 0, 320*8*2); + menu_darken_bg((char *)g_screen_ptr + 320*8*2, 320*224, 1); + memset((char *)g_screen_ptr + 320*232*2, 0, 320*8*2); } else { // should really only happen once, on startup.. - readpng(gp2x_screen, "skin/background.png", READPNG_BG); + readpng(g_screen_ptr, "skin/background.png", READPNG_BG); } // copy to buffer2 - gp2x_memcpy_buffers((1<<2), gp2x_screen, 0, 320*240*2); + gp2x_memcpy_buffers((1<<2), g_screen_ptr, 0, 320*240*2); // switch to 16bpp gp2x_video_changemode2(16);