X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=frontend%2Fplugin_lib.c;h=171296d25d3aa1e564be110dba76b03c648d32ed;hb=5b5680983b7b3dde95acfe42f58e748d9f7fe1cb;hp=c65bfebbdb801c6e398a83485a2b53ee35746b07;hpb=f40e999393f4316943760459ace0e7994c2c76b9;p=pcsx_rearmed.git diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index c65bfebb..171296d2 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -44,6 +44,7 @@ int in_analog_right[8][2] = {{ 127, 127 },{ 127, 127 },{ 127, 127 },{ 127, 127 } int in_adev[2] = { -1, -1 }, in_adev_axis[2][2] = {{ 0, 1 }, { 0, 1 }}; int in_adev_is_nublike[2]; unsigned short in_keystate[8]; +int in_mouse[8][2]; int in_state_gun; int in_enable_vibration; void *tsdev; @@ -312,6 +313,7 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h) unsigned char *dest = pl_vout_buf; const unsigned short *src = vram; int dstride = pl_vout_w, h1 = h; + int h_full = pl_vout_h - pl_vout_yoffset; int doffs; pcnt_start(PCNT_BLIT); @@ -322,7 +324,7 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h) pl_plat_clear(); else memset(pl_vout_buf, 0, - dstride * pl_vout_h * pl_vout_bpp / 8); + dstride * h_full * pl_vout_bpp / 8); goto out_hud; } @@ -338,7 +340,7 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h) pl_plat_clear(); else memset(pl_vout_buf, 0, - dstride * pl_vout_h * pl_vout_bpp / 8); + dstride * h_full * pl_vout_bpp / 8); clear_counter--; } @@ -400,6 +402,8 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h) #endif else { + src = (void *)((uintptr_t)src & ~3); // align for the blitter + for (; h1-- > 0; dest += dstride * 2, src += stride) { bgr555_to_rgb565(dest, src, w * 2); @@ -470,7 +474,7 @@ static int dispmode_default(void) return 1; } -#ifdef __ARM_NEON__ +#ifdef BUILTIN_GPU_NEON static int dispmode_doubleres(void) { if (!(pl_rearmed_cbs.gpu_caps & GPU_CAP_SUPPORTS_2X) @@ -482,7 +486,9 @@ static int dispmode_doubleres(void) snprintf(hud_msg, sizeof(hud_msg), "double resolution"); return 1; } +#endif +#ifdef __ARM_NEON__ static int dispmode_scale2x(void) { if (!resolution_ok(psx_w * 2, psx_h * 2) || psx_bpp != 16) @@ -508,8 +514,10 @@ static int dispmode_eagle2x(void) static int (*dispmode_switchers[])(void) = { dispmode_default, -#ifdef __ARM_NEON__ +#ifdef BUILTIN_GPU_NEON dispmode_doubleres, +#endif +#ifdef __ARM_NEON__ dispmode_scale2x, dispmode_eagle2x, #endif @@ -592,7 +600,6 @@ static void update_analogs(void) } } - //printf("%4d %4d %4d %4d\n", in_a1[0], in_a1[1], in_a2[0], in_a2[1]); } static void update_input(void) @@ -601,7 +608,7 @@ static void update_input(void) unsigned int emu_act; in_update(actions); - if (in_type[0] == PSE_PAD_TYPE_ANALOGPAD) + if (in_type[0] == PSE_PAD_TYPE_ANALOGJOY || in_type[0] == PSE_PAD_TYPE_ANALOGPAD) update_analogs(); emu_act = actions[IN_BINDTYPE_EMU]; in_state_gun = (emu_act & SACTION_GUN_MASK) >> SACTION_GUN_TRIGGER; @@ -674,6 +681,7 @@ void pl_frame_limit(void) hud_msg[0] = 0; } tv_old = now; + //new_dynarec_print_stats(); } #ifdef PCNT static int ya_vsync_count;