mirror of
https://github.com/libretro/RetroArch
synced 2025-04-24 15:02:35 +00:00
Merge branch 'master' into thread_video
This commit is contained in:
commit
0c6e456e65
@ -25,6 +25,7 @@ one of the buttons to progress beyond start screen)\n
|
|||||||
and Accelerate 2/Accelerate 3 (R1/R2 buttons)\n
|
and Accelerate 2/Accelerate 3 (R1/R2 buttons)\n
|
||||||
- Hooked up Gun Smoke controls - Start button (needed to progress beyond
|
- Hooked up Gun Smoke controls - Start button (needed to progress beyond
|
||||||
title screen)\n
|
title screen)\n
|
||||||
|
- Hooked up Mighty Pang controls (P1 Shot1/P1 Shot2/P2 Shot1/P2 Shot2)\n
|
||||||
- Fixed Varia Metal palette\n
|
- Fixed Varia Metal palette\n
|
||||||
- Fixed Fairyland Story palette\n
|
- Fixed Fairyland Story palette\n
|
||||||
- Fixed Return of the Invaders palette\n
|
- Fixed Return of the Invaders palette\n
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include "../msvc/msvc_compat.h"
|
||||||
|
|
||||||
#ifndef RESAMPLER_TEST
|
#ifndef RESAMPLER_TEST
|
||||||
#include "../general.h"
|
#include "../general.h"
|
||||||
|
@ -16,6 +16,7 @@ one of the buttons to progress beyond start screen)
|
|||||||
and Accelerate 2/Accelerate 3 (R1/R2 buttons)
|
and Accelerate 2/Accelerate 3 (R1/R2 buttons)
|
||||||
- Hooked up Gun Smoke controls - Start button (needed to progress beyond
|
- Hooked up Gun Smoke controls - Start button (needed to progress beyond
|
||||||
title screen)
|
title screen)
|
||||||
|
- Hooked up Mighty Pang controls (P1 Shot1/P1 Shot2/P2 Shot1/P2 Shot2)
|
||||||
- Fixed Varia Metal palette
|
- Fixed Varia Metal palette
|
||||||
- Fixed Fairyland Story palette
|
- Fixed Fairyland Story palette
|
||||||
- Fixed Return of the Invaders palette
|
- Fixed Return of the Invaders palette
|
||||||
|
@ -312,7 +312,13 @@ end:
|
|||||||
void D3DVideo::calculate_rect(unsigned width, unsigned height,
|
void D3DVideo::calculate_rect(unsigned width, unsigned height,
|
||||||
bool keep, float desired_aspect)
|
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);
|
set_viewport(0, 0, width, height);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -66,6 +66,8 @@ struct input_overlay
|
|||||||
const video_overlay_interface_t *iface;
|
const video_overlay_interface_t *iface;
|
||||||
bool enable;
|
bool enable;
|
||||||
|
|
||||||
|
bool blocked;
|
||||||
|
|
||||||
struct overlay *overlays;
|
struct overlay *overlays;
|
||||||
const struct overlay *active;
|
const struct overlay *active;
|
||||||
size_t index;
|
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)
|
uint64_t input_overlay_poll(input_overlay_t *ol, int16_t norm_x, int16_t norm_y)
|
||||||
{
|
{
|
||||||
if (!ol->enable)
|
if (!ol->enable)
|
||||||
|
{
|
||||||
|
ol->blocked = false;
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// norm_x and norm_y is in [-0x7fff, 0x7fff] range, like RETRO_DEVICE_POINTER.
|
// norm_x and norm_y is in [-0x7fff, 0x7fff] range, like RETRO_DEVICE_POINTER.
|
||||||
float x = (float)(norm_x + 0x7fff) / 0xffff;
|
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;
|
state |= ol->active->descs[i].key_mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!state)
|
||||||
|
ol->blocked = false;
|
||||||
|
else if (ol->blocked)
|
||||||
|
state = 0;
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void input_overlay_poll_clear(input_overlay_t *ol)
|
||||||
|
{
|
||||||
|
ol->blocked = false;
|
||||||
|
}
|
||||||
|
|
||||||
void input_overlay_next(input_overlay_t *ol)
|
void input_overlay_next(input_overlay_t *ol)
|
||||||
{
|
{
|
||||||
ol->index = (ol->index + 1) % ol->size;
|
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->iface->vertex_geom(ol->iface_data,
|
||||||
ol->active->mod_x, ol->active->mod_y, ol->active->mod_w, ol->active->mod_h);
|
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->iface->full_screen(ol->iface_data, ol->active->full_screen);
|
||||||
|
ol->blocked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool input_overlay_full_screen(input_overlay_t *ol)
|
bool input_overlay_full_screen(input_overlay_t *ol)
|
||||||
|
@ -37,6 +37,9 @@ bool input_overlay_full_screen(input_overlay_t *ol);
|
|||||||
// Resulting state is a bitmask of (1 << key_bind_id).
|
// 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);
|
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.
|
// Sets a modulating factor for alpha channel. Default is 1.0.
|
||||||
// The alpha factor is applied for all overlays.
|
// The alpha factor is applied for all overlays.
|
||||||
void input_overlay_set_alpha_mod(input_overlay_t *ol, float mod);
|
void input_overlay_set_alpha_mod(input_overlay_t *ol, float mod);
|
||||||
|
@ -185,7 +185,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\cheats.c" />
|
<ClCompile Include="..\..\cheats.c" />
|
||||||
<ClCompile Include="..\..\compat\rxml\rxml.c" />
|
<ClCompile Include="..\..\compat\rxml\rxml.c" />
|
||||||
<ClCompile Include="..\..\deps\rzlib\rzlib.c" />
|
<ClCompile Include="..\..\deps\miniz\miniz.c" />
|
||||||
<ClCompile Include="..\..\file_extract.c" />
|
<ClCompile Include="..\..\file_extract.c" />
|
||||||
<ClCompile Include="..\..\gfx\d3d9\d3d9.cpp" />
|
<ClCompile Include="..\..\gfx\d3d9\d3d9.cpp" />
|
||||||
<ClCompile Include="..\..\gfx\d3d9\render_chain.cpp" />
|
<ClCompile Include="..\..\gfx\d3d9\render_chain.cpp" />
|
||||||
|
@ -204,15 +204,15 @@
|
|||||||
<ClCompile Include="..\..\gfx\shader_glsl.c">
|
<ClCompile Include="..\..\gfx\shader_glsl.c">
|
||||||
<Filter>Source Files\gfx</Filter>
|
<Filter>Source Files\gfx</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\deps\rzlib\rzlib.c">
|
|
||||||
<Filter>Source Files\deps</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\file_extract.c">
|
<ClCompile Include="..\..\file_extract.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\gfx\rpng\rpng.c">
|
<ClCompile Include="..\..\gfx\rpng\rpng.c">
|
||||||
<Filter>Source Files\gfx\rpng</Filter>
|
<Filter>Source Files\gfx\rpng</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\deps\miniz\miniz.c">
|
||||||
|
<Filter>Source Files\deps</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="resource.h">
|
<ClInclude Include="resource.h">
|
||||||
|
@ -42,6 +42,7 @@ typedef int ssize_t;
|
|||||||
#pragma warning(disable : 4305)
|
#pragma warning(disable : 4305)
|
||||||
#pragma warning(disable : 4146)
|
#pragma warning(disable : 4146)
|
||||||
#pragma warning(disable : 4267)
|
#pragma warning(disable : 4267)
|
||||||
|
#pragma warning(disable : 4723)
|
||||||
|
|
||||||
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
|
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
|
||||||
|
|
||||||
|
@ -482,6 +482,7 @@ static inline void input_poll_overlay(void)
|
|||||||
unsigned device = input_overlay_full_screen(driver.overlay) ?
|
unsigned device = input_overlay_full_screen(driver.overlay) ?
|
||||||
RARCH_DEVICE_POINTER_SCREEN : RETRO_DEVICE_POINTER;
|
RARCH_DEVICE_POINTER_SCREEN : RETRO_DEVICE_POINTER;
|
||||||
|
|
||||||
|
bool polled = false;
|
||||||
for (unsigned i = 0;
|
for (unsigned i = 0;
|
||||||
input_input_state_func(NULL, 0, device, i, RETRO_DEVICE_ID_POINTER_PRESSED);
|
input_input_state_func(NULL, 0, device, i, RETRO_DEVICE_ID_POINTER_PRESSED);
|
||||||
i++)
|
i++)
|
||||||
@ -492,7 +493,11 @@ static inline void input_poll_overlay(void)
|
|||||||
device, i, RETRO_DEVICE_ID_POINTER_Y);
|
device, i, RETRO_DEVICE_ID_POINTER_Y);
|
||||||
|
|
||||||
driver.overlay_state |= input_overlay_poll(driver.overlay, x, y);
|
driver.overlay_state |= input_overlay_poll(driver.overlay, x, y);
|
||||||
|
polled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!polled)
|
||||||
|
input_overlay_poll_clear(driver.overlay);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user