Merge branch 'master' into thread_video

This commit is contained in:
Themaister 2013-02-17 15:49:58 +01:00
commit 0c6e456e65
10 changed files with 40 additions and 6 deletions

View File

@ -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

View File

@ -23,6 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "../msvc/msvc_compat.h"
#ifndef RESAMPLER_TEST
#include "../general.h"

View File

@ -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

View File

@ -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
{

View File

@ -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)

View File

@ -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);

View File

@ -185,7 +185,7 @@
</ClCompile>
<ClCompile Include="..\..\cheats.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="..\..\gfx\d3d9\d3d9.cpp" />
<ClCompile Include="..\..\gfx\d3d9\render_chain.cpp" />
@ -272,4 +272,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -204,15 +204,15 @@
<ClCompile Include="..\..\gfx\shader_glsl.c">
<Filter>Source Files\gfx</Filter>
</ClCompile>
<ClCompile Include="..\..\deps\rzlib\rzlib.c">
<Filter>Source Files\deps</Filter>
</ClCompile>
<ClCompile Include="..\..\file_extract.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\gfx\rpng\rpng.c">
<Filter>Source Files\gfx\rpng</Filter>
</ClCompile>
<ClCompile Include="..\..\deps\miniz\miniz.c">
<Filter>Source Files\deps</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">

View File

@ -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))

View File

@ -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