From 041bfecf21cb39c8428c0ac3a8e06d4a2c78fb44 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 17 Feb 2013 15:00:38 +0100 Subject: [PATCH 1/6] Avoid "double-tapping" overlay on overlay_next. --- input/overlay.c | 16 ++++++++++++++++ input/overlay.h | 3 +++ retroarch.c | 5 +++++ 3 files changed, 24 insertions(+) diff --git a/input/overlay.c b/input/overlay.c index 7ce145247c..b14fdcb0ff 100644 --- a/input/overlay.c +++ b/input/overlay.c @@ -66,6 +66,8 @@ struct input_overlay const video_overlay_interface_t *iface; bool enable; + bool blocked; + struct overlay *overlays; const struct overlay *active; size_t index; @@ -390,7 +392,10 @@ static bool inside_hitbox(const struct overlay_desc *desc, float x, float y) uint64_t input_overlay_poll(input_overlay_t *ol, int16_t norm_x, int16_t norm_y) { if (!ol->enable) + { + ol->blocked = false; return 0; + } // norm_x and norm_y is in [-0x7fff, 0x7fff] range, like RETRO_DEVICE_POINTER. float x = (float)(norm_x + 0x7fff) / 0xffff; @@ -408,9 +413,19 @@ uint64_t input_overlay_poll(input_overlay_t *ol, int16_t norm_x, int16_t norm_y) state |= ol->active->descs[i].key_mask; } + if (!state) + ol->blocked = false; + else if (ol->blocked) + state = 0; + return state; } +void input_overlay_poll_clear(input_overlay_t *ol) +{ + ol->blocked = false; +} + void input_overlay_next(input_overlay_t *ol) { ol->index = (ol->index + 1) % ol->size; @@ -420,6 +435,7 @@ void input_overlay_next(input_overlay_t *ol) ol->iface->vertex_geom(ol->iface_data, ol->active->mod_x, ol->active->mod_y, ol->active->mod_w, ol->active->mod_h); ol->iface->full_screen(ol->iface_data, ol->active->full_screen); + ol->blocked = true; } bool input_overlay_full_screen(input_overlay_t *ol) diff --git a/input/overlay.h b/input/overlay.h index c8d25fe1db..b6362ada30 100644 --- a/input/overlay.h +++ b/input/overlay.h @@ -37,6 +37,9 @@ bool input_overlay_full_screen(input_overlay_t *ol); // Resulting state is a bitmask of (1 << key_bind_id). uint64_t input_overlay_poll(input_overlay_t *ol, int16_t norm_x, int16_t norm_y); +// Call when there is nothing to poll. Allows overlay to clear certain state. +void input_overlay_poll_clear(input_overlay_t *ol); + // Sets a modulating factor for alpha channel. Default is 1.0. // The alpha factor is applied for all overlays. void input_overlay_set_alpha_mod(input_overlay_t *ol, float mod); diff --git a/retroarch.c b/retroarch.c index dd20006b7d..06dd7de0cd 100644 --- a/retroarch.c +++ b/retroarch.c @@ -482,6 +482,7 @@ static inline void input_poll_overlay(void) unsigned device = input_overlay_full_screen(driver.overlay) ? RARCH_DEVICE_POINTER_SCREEN : RETRO_DEVICE_POINTER; + bool polled = false; for (unsigned i = 0; input_input_state_func(NULL, 0, device, i, RETRO_DEVICE_ID_POINTER_PRESSED); i++) @@ -492,7 +493,11 @@ static inline void input_poll_overlay(void) device, i, RETRO_DEVICE_ID_POINTER_Y); driver.overlay_state |= input_overlay_poll(driver.overlay, x, y); + polled = true; } + + if (!polled) + input_overlay_poll_clear(driver.overlay); } #endif From 6e1cec5090f1a85d7d398d980da49672e53ceaab Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 17 Feb 2013 15:04:26 +0100 Subject: [PATCH 2/6] (Xbox 1) Sinc - get rid of warning --- audio/sinc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/audio/sinc.c b/audio/sinc.c index fab9fff16a..1972df946d 100644 --- a/audio/sinc.c +++ b/audio/sinc.c @@ -30,6 +30,10 @@ #define RARCH_LOG(...) fprintf(stderr, __VA_ARGS__) #endif +#ifdef _XBOX1 +#pragma warning(disable : 4723) +#endif + #ifdef __SSE__ #include #endif From 59e7bc82db5f9088b4b4e528e1510f013555864d Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 17 Feb 2013 15:10:03 +0100 Subject: [PATCH 3/6] Move warning disable to msvc_compat.h. --- audio/sinc.c | 5 +---- msvc/msvc_compat.h | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/audio/sinc.c b/audio/sinc.c index 1972df946d..8aeb6c9fb0 100644 --- a/audio/sinc.c +++ b/audio/sinc.c @@ -23,6 +23,7 @@ #include #include #include +#include "../msvc/msvc_compat.h" #ifndef RESAMPLER_TEST #include "../general.h" @@ -30,10 +31,6 @@ #define RARCH_LOG(...) fprintf(stderr, __VA_ARGS__) #endif -#ifdef _XBOX1 -#pragma warning(disable : 4723) -#endif - #ifdef __SSE__ #include #endif diff --git a/msvc/msvc_compat.h b/msvc/msvc_compat.h index adbbcb9b03..43e1fe903b 100644 --- a/msvc/msvc_compat.h +++ b/msvc/msvc_compat.h @@ -42,6 +42,7 @@ typedef int ssize_t; #pragma warning(disable : 4305) #pragma warning(disable : 4146) #pragma warning(disable : 4267) +#pragma warning(disable : 4723) #define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f)) From 9f6fc7269be5ed959ed5567f774c253d73cfb73f Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 17 Feb 2013 15:37:27 +0100 Subject: [PATCH 4/6] Fix MSVC2010 build. --- msvc/msvc-2010/RetroArch-msvc2010.vcxproj | 4 ++-- msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj index 3533b66c2e..b4cc93f5a8 100644 --- a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj +++ b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj @@ -185,7 +185,7 @@ - + @@ -272,4 +272,4 @@ - + \ No newline at end of file diff --git a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters index e35b2ee99b..1cb7219c01 100644 --- a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters +++ b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters @@ -204,15 +204,15 @@ Source Files\gfx - - Source Files\deps - Source Files Source Files\gfx\rpng + + Source Files\deps + From 091403cb5d3f993c30d131ecd3166bb79d193de9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 17 Feb 2013 15:38:06 +0100 Subject: [PATCH 5/6] Update CHANGELOG --- android/phoenix/res/layout/faq_whats_new.xml | 1 + dist-scripts/retroarch-CHANGELOG.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/android/phoenix/res/layout/faq_whats_new.xml b/android/phoenix/res/layout/faq_whats_new.xml index 8593b386a7..893a57a54d 100644 --- a/android/phoenix/res/layout/faq_whats_new.xml +++ b/android/phoenix/res/layout/faq_whats_new.xml @@ -25,6 +25,7 @@ one of the buttons to progress beyond start screen)\n and Accelerate 2/Accelerate 3 (R1/R2 buttons)\n - Hooked up Gun Smoke controls - Start button (needed to progress beyond title screen)\n +- Hooked up Mighty Pang controls (P1 Shot1/P1 Shot2/P2 Shot1/P2 Shot2)\n - Fixed Varia Metal palette\n - Fixed Fairyland Story palette\n - Fixed Return of the Invaders palette\n diff --git a/dist-scripts/retroarch-CHANGELOG.txt b/dist-scripts/retroarch-CHANGELOG.txt index 2a88b79dab..99f7cea990 100644 --- a/dist-scripts/retroarch-CHANGELOG.txt +++ b/dist-scripts/retroarch-CHANGELOG.txt @@ -16,6 +16,7 @@ one of the buttons to progress beyond start screen) and Accelerate 2/Accelerate 3 (R1/R2 buttons) - Hooked up Gun Smoke controls - Start button (needed to progress beyond title screen) +- Hooked up Mighty Pang controls (P1 Shot1/P1 Shot2/P2 Shot1/P2 Shot2) - Fixed Varia Metal palette - Fixed Fairyland Story palette - Fixed Return of the Invaders palette From 0dcf6791a496bbbd003913094610f54ddf022987 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 17 Feb 2013 15:42:33 +0100 Subject: [PATCH 6/6] Add integer scale to PC D3D9. --- gfx/d3d9/d3d9.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gfx/d3d9/d3d9.cpp b/gfx/d3d9/d3d9.cpp index 70efc7a69e..af21c38d44 100644 --- a/gfx/d3d9/d3d9.cpp +++ b/gfx/d3d9/d3d9.cpp @@ -312,7 +312,13 @@ end: void D3DVideo::calculate_rect(unsigned width, unsigned height, bool keep, float desired_aspect) { - if (!keep) + if (g_settings.video.scale_integer) + { + struct rarch_viewport vp = {0}; + gfx_scale_integer(&vp, width, height, desired_aspect, keep); + set_viewport(vp.x, vp.y, vp.width, vp.height); + } + else if (!keep) set_viewport(0, 0, width, height); else {