mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
(MSVC 2010) Compile griffin.c as C
This commit is contained in:
parent
7ff34f8efe
commit
721afe22d8
@ -1172,7 +1172,9 @@ bool audio_driver_callback(void)
|
||||
|
||||
bool audio_driver_has_callback(void)
|
||||
{
|
||||
return audio_callback.callback;
|
||||
if (audio_callback.callback)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool audio_driver_toggle_mute(void)
|
||||
|
@ -100,7 +100,7 @@ static void WINAPI voice_on_buffer_end(void *handle_, void *data)
|
||||
{
|
||||
xaudio2_t *handle = (xaudio2_t*)handle_;
|
||||
(void)data;
|
||||
InterlockedDecrement((__LONG32 volatile*)&handle->buffers);
|
||||
InterlockedDecrement((LONG volatile*)&handle->buffers);
|
||||
SetEvent(handle->hEvent);
|
||||
}
|
||||
|
||||
|
@ -966,7 +966,23 @@ static bool d3d_construct(d3d_video_t *d3d,
|
||||
void **input_data)
|
||||
{
|
||||
gfx_ctx_input_t inp;
|
||||
unsigned full_x, full_y;
|
||||
#ifdef HAVE_MONITOR
|
||||
bool windowed_full;
|
||||
RECT mon_rect;
|
||||
MONITORINFOEX current_mon;
|
||||
HMONITOR hm_to_use;
|
||||
#endif
|
||||
#ifdef HAVE_SHADERS
|
||||
enum rarch_shader_type type;
|
||||
#endif
|
||||
#ifdef HAVE_WINDOW
|
||||
DWORD style;
|
||||
unsigned win_width = 0;
|
||||
unsigned win_height = 0;
|
||||
RECT rect = {0};
|
||||
#endif
|
||||
unsigned full_x = 0;
|
||||
unsigned full_y = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
d3d->should_resize = false;
|
||||
@ -995,11 +1011,6 @@ static bool d3d_construct(d3d_video_t *d3d,
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
bool windowed_full;
|
||||
RECT mon_rect;
|
||||
MONITORINFOEX current_mon;
|
||||
HMONITOR hm_to_use;
|
||||
|
||||
win32_monitor_info(¤t_mon, &hm_to_use, &d3d->cur_mon_id);
|
||||
mon_rect = current_mon.rcMonitor;
|
||||
g_resize_width = info->width;
|
||||
@ -1031,10 +1042,6 @@ static bool d3d_construct(d3d_video_t *d3d,
|
||||
}
|
||||
|
||||
#ifdef HAVE_WINDOW
|
||||
DWORD style;
|
||||
unsigned win_width, win_height;
|
||||
RECT rect = {0};
|
||||
|
||||
video_driver_get_size(&win_width, &win_height);
|
||||
|
||||
win32_set_style(¤t_mon, &hm_to_use, &win_width, &win_height,
|
||||
@ -1051,7 +1058,7 @@ static bool d3d_construct(d3d_video_t *d3d,
|
||||
/* This should only be done once here
|
||||
* to avoid set_shader() to be overridden
|
||||
* later. */
|
||||
enum rarch_shader_type type =
|
||||
type =
|
||||
video_shader_parse_type(settings->paths.path_shader, RARCH_SHADER_NONE);
|
||||
if (settings->bools.video_shader_enable && type == RARCH_SHADER_CG)
|
||||
{
|
||||
@ -1390,6 +1397,7 @@ static bool d3d_frame(void *data, const void *frame,
|
||||
uint64_t frame_count, unsigned pitch,
|
||||
const char *msg, video_frame_info_t *video_info)
|
||||
{
|
||||
D3DVIEWPORT screen_vp;
|
||||
unsigned i = 0;
|
||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||
#ifndef _XBOX
|
||||
@ -1430,7 +1438,6 @@ static bool d3d_frame(void *data, const void *frame,
|
||||
|
||||
/* render_chain() only clears out viewport,
|
||||
* clear out everything. */
|
||||
D3DVIEWPORT screen_vp;
|
||||
screen_vp.X = 0;
|
||||
screen_vp.Y = 0;
|
||||
screen_vp.MinZ = 0;
|
||||
|
@ -1577,7 +1577,9 @@ bool video_driver_supports_viewport_read(void)
|
||||
|
||||
bool video_driver_supports_read_frame_raw(void)
|
||||
{
|
||||
return current_video->read_frame_raw;
|
||||
if (current_video->read_frame_raw)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void video_driver_set_viewport_config(void)
|
||||
|
@ -374,20 +374,25 @@ static int action_bind_sublabel_netplay_room(
|
||||
const char *label, const char *path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
uint32_t gamecrc = 0;
|
||||
const char *ra_version = NULL;
|
||||
const char *corename = NULL;
|
||||
const char *gamename = NULL;
|
||||
const char *core_ver = NULL;
|
||||
/* This offset may cause issues if any entries are added to this menu */
|
||||
unsigned offset = i - 3;
|
||||
|
||||
if (i < 1 || offset > (unsigned)netplay_room_count)
|
||||
return 0;
|
||||
|
||||
const char *ra_version = netplay_room_list[offset].retroarch_version;
|
||||
const char *corename = netplay_room_list[offset].corename;
|
||||
const char *gamename = netplay_room_list[offset].gamename;
|
||||
const char *core_ver = netplay_room_list[offset].coreversion;
|
||||
uint32_t gamecrc = netplay_room_list[offset].gamecrc;
|
||||
ra_version = netplay_room_list[offset].retroarch_version;
|
||||
corename = netplay_room_list[offset].corename;
|
||||
gamename = netplay_room_list[offset].gamename;
|
||||
core_ver = netplay_room_list[offset].coreversion;
|
||||
gamecrc = netplay_room_list[offset].gamecrc;
|
||||
|
||||
|
||||
snprintf(s,len, "RetroArch: %s\nCore: %s (%s)\nGame: %s (%08x)",
|
||||
snprintf(s, len,
|
||||
"RetroArch: %s\nCore: %s (%s)\nGame: %s (%08x)",
|
||||
string_is_empty(ra_version) ? "n/a" : ra_version,
|
||||
corename, core_ver,
|
||||
!string_is_equal(gamename, "N/A") ? gamename : "n/a",
|
||||
|
@ -4291,6 +4291,7 @@ static int xmb_list_push(void *data, void *userdata,
|
||||
break;
|
||||
case DISPLAYLIST_MAIN_MENU:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
@ -4336,8 +4337,6 @@ static int xmb_list_push(void *data, void *userdata,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!settings->bools.menu_xmb_show_settings && !string_is_empty(settings->paths.menu_xmb_show_settings_password))
|
||||
{
|
||||
entry.enum_idx = MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS;
|
||||
|
@ -356,7 +356,12 @@
|
||||
<ResourceCompile Include="..\..\..\media\rarch.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\griffin\griffin.c" />
|
||||
<ClCompile Include="..\..\..\griffin\griffin.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug Cg|Win32'">CompileAsC</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release Cg|Win32'">CompileAsC</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\griffin\griffin_cpp.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user