X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Flinux%2Femu.c;fp=platform%2Flinux%2Femu.c;h=5d4432fa05e6eb404d7750ebb1b790c6585d239d;hb=9cdfc191b60cb8881552d01f84e21bdcbb48758d;hp=c470a7717b3cc4c3a85e7393b5bd2a461ab1e00a;hpb=88f6038d0572233e6d076ca4319166f2c4381bbb;p=picodrive.git diff --git a/platform/linux/emu.c b/platform/linux/emu.c index c470a77..5d4432f 100644 --- a/platform/linux/emu.c +++ b/platform/linux/emu.c @@ -67,7 +67,7 @@ static void draw_cd_leds(void) void pemu_finalize_frame(const char *fps, const char *notice) { if (currentConfig.renderer != RT_16BIT && !(PicoIn.AHW & PAHW_32X)) { - unsigned short *pd = (unsigned short *)g_screen_ptr + 8 * g_screen_width; + unsigned short *pd = (unsigned short *)g_screen_ptr + 8 * g_screen_ppitch; unsigned char *ps = Pico.est.Draw2FB + 328*8 + 8; unsigned short *pal = Pico.est.HighPal; int i, x; @@ -94,7 +94,7 @@ static void apply_renderer(void) case RT_16BIT: PicoIn.opt &= ~POPT_ALT_RENDERER; PicoDrawSetOutFormat(PDF_RGB555, 0); - PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2); + PicoDrawSetOutBuf(g_screen_ptr, g_screen_ppitch * 2); break; case RT_8BIT_ACC: PicoIn.opt &= ~POPT_ALT_RENDERER; @@ -108,7 +108,7 @@ static void apply_renderer(void) } if (PicoIn.AHW & PAHW_32X) - PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2); + PicoDrawSetOutBuf(g_screen_ptr, g_screen_ppitch * 2); } void plat_video_toggle_renderer(int change, int is_menu) @@ -127,8 +127,8 @@ void plat_video_toggle_renderer(int change, int is_menu) void plat_status_msg_clear(void) { - unsigned short *d = (unsigned short *)g_screen_ptr + g_screen_width * g_screen_height; - int l = g_screen_width * 8; + unsigned short *d = (unsigned short *)g_screen_ptr + g_screen_ppitch * g_screen_height; + int l = g_screen_ppitch * 8; memset32((int *)(d - l), 0, l * 2 / 4); } @@ -143,7 +143,7 @@ void plat_status_msg_busy_next(const char *msg) void plat_status_msg_busy_first(const char *msg) { -// memset32(g_screen_ptr, 0, g_screen_width * g_screen_height * 2 / 4); +// memset32(g_screen_ptr, 0, g_screen_ppitch * g_screen_height * 2 / 4); plat_status_msg_busy_next(msg); } @@ -153,7 +153,7 @@ void plat_update_volume(int has_changed, int is_up) void pemu_forced_frame(int no_scale, int do_emu) { - PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2); + PicoDrawSetOutBuf(g_screen_ptr, g_screen_ppitch * 2); PicoDrawSetCallbacks(NULL, NULL); Pico.m.dirtyPal = 1; @@ -174,7 +174,7 @@ void plat_debug_cat(char *str) void emu_video_mode_change(int start_line, int line_count, int is_32cols) { // clear whole screen in all buffers - memset32(g_screen_ptr, 0, g_screen_width * g_screen_height * 2 / 4); + memset32(g_screen_ptr, 0, g_screen_ppitch * g_screen_height * 2 / 4); } void pemu_loop_prep(void)