X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Flinux%2Femu.c;h=5d4432fa05e6eb404d7750ebb1b790c6585d239d;hb=fda2f31020bf0d6cf7b5dd70ec01cf390b7e1483;hp=ddde8dab35fda230ec3e0e74a83de884b1f1c7aa;hpb=93f9619ed819dee07948416c98ca2f1c70a22666;p=picodrive.git diff --git a/platform/linux/emu.c b/platform/linux/emu.c index ddde8da..5d4432f 100644 --- a/platform/linux/emu.c +++ b/platform/linux/emu.c @@ -29,7 +29,7 @@ void pemu_prep_defconfig(void) void pemu_validate_config(void) { -#ifndef __arm__ +#if !defined(__arm__) && !defined(__i386__) && !defined(__x86_64__) PicoIn.opt &= ~POPT_EN_DRC; #endif } @@ -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)