mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 10:10:57 +00:00
Win2000 buildfixes
This commit is contained in:
parent
061c13b84c
commit
e1f4db8081
@ -29,6 +29,11 @@
|
||||
#include <compat/msvc.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#if defined(_MSC_VER) && (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)
|
||||
/* needed for CoInitializeEx */
|
||||
#define _WIN32_DCOM
|
||||
#endif
|
||||
|
||||
#include "xaudio.h"
|
||||
|
||||
#include "../audio_driver.h"
|
||||
|
@ -285,7 +285,7 @@ void fill_pathname_application_path(char *s, size_t len)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XMB
|
||||
const char *xmb_theme_ident(void);
|
||||
const char* xmb_theme_ident(void);
|
||||
#endif
|
||||
|
||||
void fill_pathname_application_special(char *s, size_t len, enum application_special_type type)
|
||||
|
@ -328,7 +328,7 @@ static uint64_t frontend_win32_get_mem_used(void)
|
||||
static void frontend_win32_attach_console(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#if(_WIN32_WINNT >= 0x0500)
|
||||
#ifdef _WIN32_WINNT_WINXP
|
||||
if (!AttachConsole(ATTACH_PARENT_PROCESS))
|
||||
{
|
||||
AllocConsole();
|
||||
@ -343,7 +343,7 @@ static void frontend_win32_attach_console(void)
|
||||
static void frontend_win32_detach_console(void)
|
||||
{
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if(_WIN32_WINNT >= 0x0500)
|
||||
#ifdef _WIN32_WINNT_WINXP
|
||||
if (!AttachConsole(ATTACH_PARENT_PROCESS))
|
||||
{
|
||||
HWND wnd = GetConsoleWindow();
|
||||
|
@ -114,7 +114,9 @@ typedef enum _POWER_REQUEST_TYPE
|
||||
#define POWER_REQUEST_CONTEXT_DETAILED_STRING 2
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32_WINNT_WIN7
|
||||
typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_REQUEST_CONTEXT;
|
||||
#endif
|
||||
|
||||
#ifndef MAX_MONITORS
|
||||
#define MAX_MONITORS 9
|
||||
@ -585,6 +587,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
|
||||
#endif
|
||||
return DefWindowProc(hwnd, message, wparam, lparam);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool win32_window_create(void *data, unsigned style,
|
||||
RECT *mon_rect, unsigned width,
|
||||
@ -724,6 +727,7 @@ bool win32_suppress_screensaver(void *data, bool enable)
|
||||
|
||||
if (major*100+minor >= 601)
|
||||
{
|
||||
#ifdef _WIN32_WINNT_WIN7
|
||||
/* Windows 7, 8, 10 codepath */
|
||||
typedef HANDLE (WINAPI * PowerCreateRequestPtr)(REASON_CONTEXT *context);
|
||||
typedef BOOL (WINAPI * PowerSetRequestPtr)(HANDLE PowerRequest,
|
||||
@ -748,6 +752,7 @@ bool win32_suppress_screensaver(void *data, bool enable)
|
||||
powerSetRequest( Request, PowerRequestDisplayRequired);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -259,18 +259,18 @@ static bool d3d_init_multipass(d3d_video_t *d3d)
|
||||
}
|
||||
|
||||
memset(&d3d->shader, 0, sizeof(d3d->shader));
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
if (!video_shader_read_conf_cgp(conf, &d3d->shader))
|
||||
{
|
||||
config_file_free(conf);
|
||||
RARCH_ERR("Failed to parse CGP file.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
config_file_free(conf);
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
video_shader_resolve_relative(&d3d->shader, d3d->shader_path.c_str());
|
||||
|
||||
#endif
|
||||
RARCH_LOG("[D3D9 Meta-Cg] Found %u shaders.\n", d3d->shader.passes);
|
||||
|
||||
for (i = 0; i < d3d->shader.passes; i++)
|
||||
|
@ -46,7 +46,7 @@ static void *d3dfonts_w32_init_font(void *video_data,
|
||||
OUT_TT_PRECIS,
|
||||
CLIP_DEFAULT_PRECIS,
|
||||
DEFAULT_PITCH,
|
||||
#ifdef _MSC_VER /* MSVC needs w_char* */
|
||||
#if defined(_MSC_VER) && _WIN32_WINNT > 0x0500 /* MSVC needs w_char* starting with XP */
|
||||
L"Verdana" /* Hardcode FTL */
|
||||
#else
|
||||
"Verdana"
|
||||
|
@ -1011,7 +1011,7 @@ MENU
|
||||
#include "../menu/drivers/rgui.c"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_VITA2D) || defined(_3DS)
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_VITA2D) || defined(_3DS) || defined(_MSC_VER)
|
||||
#ifdef HAVE_XMB
|
||||
#include "../menu/drivers/xmb.c"
|
||||
#endif
|
||||
|
@ -26,6 +26,7 @@
|
||||
#if defined(_MSC_VER) && !defined(_XBOX)
|
||||
/* https://support.microsoft.com/en-us/kb/980263 */
|
||||
#pragma execution_character_set("utf-8")
|
||||
#pragma warning( disable : 4566 )
|
||||
#endif
|
||||
|
||||
int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
|
@ -20,6 +20,7 @@
|
||||
#if defined(_MSC_VER) && !defined(_XBOX)
|
||||
/* https://support.microsoft.com/en-us/kb/980263 */
|
||||
#pragma execution_character_set("utf-8")
|
||||
#pragma warning( disable: 4566 )
|
||||
#endif
|
||||
|
||||
int menu_hash_get_help_pl_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
|
@ -71,10 +71,10 @@ bool net_ifinfo_new(net_ifinfo_t *list)
|
||||
{
|
||||
unsigned k = 0;
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
PIP_ADAPTER_ADDRESSES adapter_addresses = NULL, aa = NULL;
|
||||
PIP_ADAPTER_UNICAST_ADDRESS ua = NULL;
|
||||
#ifdef _WIN32_WINNT_WINXP
|
||||
DWORD size;
|
||||
PIP_ADAPTER_ADDRESSES adapter_addresses, aa;
|
||||
PIP_ADAPTER_UNICAST_ADDRESS ua;
|
||||
|
||||
DWORD rv = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_PREFIX, NULL, NULL, &size);
|
||||
|
||||
adapter_addresses = (PIP_ADAPTER_ADDRESSES)malloc(size);
|
||||
@ -85,7 +85,7 @@ bool net_ifinfo_new(net_ifinfo_t *list)
|
||||
|
||||
if (rv != ERROR_SUCCESS)
|
||||
goto error;
|
||||
|
||||
#endif
|
||||
for (aa = adapter_addresses; aa != NULL; aa = aa->Next)
|
||||
{
|
||||
char name[PATH_MAX_LENGTH];
|
||||
|
@ -37,6 +37,9 @@
|
||||
#include <xtl.h>
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0500 /*_WIN32_WINNT_WIN2K */
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#elif defined(GEKKO)
|
||||
|
@ -376,7 +376,7 @@ float gradient_dark[16] = {
|
||||
0.0, 0.0, 0.0, 1.00,
|
||||
};
|
||||
|
||||
const char *xmb_theme_ident(void)
|
||||
const char* xmb_theme_ident(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
switch (settings->menu.xmb.theme)
|
||||
|
@ -224,6 +224,7 @@ static void shader_dlg_params_clear(void)
|
||||
|
||||
void shader_dlg_params_reload(void)
|
||||
{
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
HFONT hFont;
|
||||
RECT parent_rect;
|
||||
int i, pos_x, pos_y;
|
||||
@ -325,7 +326,7 @@ void shader_dlg_params_reload(void)
|
||||
(pos_x - SHADER_DLG_CTRL_X) + SHADER_DLG_WIDTH,
|
||||
(pos_x == SHADER_DLG_CTRL_X) ? pos_y + 30 : SHADER_DLG_MAX_HEIGHT,
|
||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
static void shader_dlg_update_on_top_state(void)
|
||||
|
Loading…
Reference in New Issue
Block a user