mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 03:40:03 +00:00
VC6 buildfixes, add Makefile.griffin target for it
This commit is contained in:
parent
8f1523f659
commit
07566c51a1
@ -294,6 +294,50 @@ else ifeq ($(platform), vita)
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
RARCH_CONSOLE = 1
|
||||
else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_FBO := 1
|
||||
HAVE_COMMAND := 1
|
||||
HAVE_STDIN_CMD := 1
|
||||
HAVE_CMD := 1
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
CC = cl.exe
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
|
||||
VCDIR := $(shell reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\DevStudio\6.0\Products\Microsoft Visual C++" -v "ProductDir" | grep -o '[A-Z]:\\.*')
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VCDIR)/bin"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VCDIR)/../Common/MSDev98/Bin")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VCDIR)/Include")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VCDIR)/Lib")
|
||||
|
||||
WindowsSdkDir := $(INETSDK)
|
||||
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)/Include;libretro-common/include;libretro-common/include/compat/msvc
|
||||
export LIB := $(LIB);$(WindowsSdkDir);$(INETSDK)/Lib
|
||||
else ifeq ($(platform), windows_msvc2003_x86)
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
@ -513,7 +557,11 @@ endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
ifneq (,$(findstring msvc,$(platform)))
|
||||
CFLAGS += -Od -Zi -D_DEBUG -MTd -Wp64 -TP
|
||||
ifeq ($(platform), windows_msvc2003_x86)
|
||||
CFLAGS += -Wp64
|
||||
endif
|
||||
|
||||
CFLAGS += -Od -Zi -D_DEBUG -MTd -TP
|
||||
else
|
||||
CFLAGS += -O0 -g -DDEBUG
|
||||
endif
|
||||
@ -522,7 +570,11 @@ else ifeq ($(platform), psp1)
|
||||
else ifeq ($(platform), vita)
|
||||
CFLAGS += -O3
|
||||
else ifneq (,$(findstring msvc,$(platform)))
|
||||
CFLAGS += -O2 -DNDEBUG -MT -Wp64 -TP
|
||||
ifeq ($(platform), windows_msvc2003_x86)
|
||||
CFLAGS += -Wp64
|
||||
endif
|
||||
|
||||
CFLAGS += -O2 -DNDEBUG -MT -TP
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
@ -79,7 +79,7 @@ ui_window_win32_t main_window;
|
||||
/* Power Request APIs */
|
||||
|
||||
#if !defined(_XBOX) && (_MSC_VER == 1310)
|
||||
typedef struct _REASON_CONTEXT
|
||||
typedef struct _REASON_CONTEXT
|
||||
{
|
||||
ULONG Version;
|
||||
DWORD Flags;
|
||||
@ -131,7 +131,7 @@ void unset_doubleclick_on_titlebar(void)
|
||||
doubleclick_on_titlebar = false;
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK PickCoreProc(HWND hDlg, UINT message,
|
||||
BOOL CALLBACK PickCoreProc(HWND hDlg, UINT message,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
size_t list_size;
|
||||
@ -150,16 +150,16 @@ INT_PTR CALLBACK PickCoreProc(HWND hDlg, UINT message,
|
||||
core_info_list_get_supported_cores(core_info_list,
|
||||
path_get(RARCH_PATH_CONTENT), &core_info, &list_size);
|
||||
|
||||
hwndList = GetDlgItem(hDlg, ID_CORELISTBOX);
|
||||
hwndList = GetDlgItem(hDlg, ID_CORELISTBOX);
|
||||
|
||||
for (i = 0; i < list_size; i++)
|
||||
{
|
||||
const core_info_t *info = (const core_info_t*)&core_info[i];
|
||||
SendMessage(hwndList, LB_ADDSTRING, 0,
|
||||
(LPARAM)info->display_name);
|
||||
SendMessage(hwndList, LB_ADDSTRING, 0,
|
||||
(LPARAM)info->display_name);
|
||||
}
|
||||
SetFocus(hwndList);
|
||||
return TRUE;
|
||||
SetFocus(hwndList);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
@ -170,22 +170,22 @@ INT_PTR CALLBACK PickCoreProc(HWND hDlg, UINT message,
|
||||
EndDialog(hDlg, LOWORD(wParam));
|
||||
break;
|
||||
case ID_CORELISTBOX:
|
||||
switch (HIWORD(wParam))
|
||||
{
|
||||
switch (HIWORD(wParam))
|
||||
{
|
||||
case LBN_SELCHANGE:
|
||||
{
|
||||
const core_info_t *info = NULL;
|
||||
HWND hwndList = GetDlgItem(
|
||||
hDlg, ID_CORELISTBOX);
|
||||
hDlg, ID_CORELISTBOX);
|
||||
int lbItem = (int)
|
||||
SendMessage(hwndList, LB_GETCURSEL, 0, 0);
|
||||
SendMessage(hwndList, LB_GETCURSEL, 0, 0);
|
||||
|
||||
core_info_get_list(&core_info_list);
|
||||
core_info_list_get_supported_cores(core_info_list,
|
||||
path_get(RARCH_PATH_CONTENT), &core_info, &list_size);
|
||||
info = (const core_info_t*)&core_info[lbItem];
|
||||
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH,info->path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
@ -208,7 +208,7 @@ void win32_monitor_from_window(void)
|
||||
#ifndef _XBOX
|
||||
ui_window_t *window = NULL;
|
||||
|
||||
win32_monitor_last =
|
||||
win32_monitor_last =
|
||||
MonitorFromWindow(main_window.hwnd, MONITOR_DEFAULTTONEAREST);
|
||||
|
||||
window = (ui_window_t*)ui_companion_driver_get_window_ptr();
|
||||
@ -347,7 +347,7 @@ static int win32_drag_query_file(HWND hwnd, WPARAM wparam)
|
||||
{
|
||||
/* Pick one core that could be compatible, ew */
|
||||
if(DialogBoxParam(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_PICKCORE),
|
||||
hwnd,PickCoreProc,(LPARAM)NULL)==IDOK)
|
||||
hwnd,PickCoreProc,(LPARAM)NULL)==IDOK)
|
||||
{
|
||||
task_push_load_content_with_current_core_from_companion_ui(
|
||||
NULL,
|
||||
@ -384,7 +384,7 @@ static LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message,
|
||||
|
||||
switch (message)
|
||||
{
|
||||
/* Seems to be hard to synchronize
|
||||
/* Seems to be hard to synchronize
|
||||
* WM_CHAR and WM_KEYDOWN properly.
|
||||
*/
|
||||
case WM_CHAR:
|
||||
@ -539,7 +539,7 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
|
||||
LPCREATESTRUCT p_cs = (LPCREATESTRUCT)lparam;
|
||||
curD3D = p_cs->lpCreateParams;
|
||||
g_inited = true;
|
||||
|
||||
|
||||
win32_window.hwnd = hwnd;
|
||||
|
||||
win32_set_droppable(&win32_window, true);
|
||||
@ -778,7 +778,7 @@ static bool win32_monitor_set_fullscreen(
|
||||
devmode.dmPelsWidth = width;
|
||||
devmode.dmPelsHeight = height;
|
||||
devmode.dmDisplayFrequency = refresh;
|
||||
devmode.dmFields = DM_PELSWIDTH
|
||||
devmode.dmFields = DM_PELSWIDTH
|
||||
| DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
|
||||
|
||||
RARCH_LOG("Setting fullscreen to %ux%u @ %uHz on device %s.\n",
|
||||
@ -809,7 +809,7 @@ void win32_check_window(bool *quit, bool *resize,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
const ui_application_t *application =
|
||||
const ui_application_t *application =
|
||||
ui_companion_driver_get_application_ptr();
|
||||
if (application)
|
||||
application->process_events();
|
||||
@ -896,12 +896,12 @@ void win32_set_style(MONITORINFOEX *current_mon, HMONITOR *hm_to_use,
|
||||
#ifndef _XBOX
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
/* Windows only reports the refresh rates for modelines as
|
||||
* an integer, so video_refresh_rate needs to be rounded. Also, account
|
||||
/* Windows only reports the refresh rates for modelines as
|
||||
* an integer, so video_refresh_rate needs to be rounded. Also, account
|
||||
* for black frame insertion using video_refresh_rate set to half
|
||||
* of the display refresh rate, as well as higher vsync swap intervals. */
|
||||
float refresh_mod = settings->bools.video_black_frame_insertion ? 2.0f : 1.0f;
|
||||
unsigned refresh = roundf(settings->floats.video_refresh_rate
|
||||
unsigned refresh = roundf(settings->floats.video_refresh_rate
|
||||
* refresh_mod * settings->uints.video_swap_interval);
|
||||
|
||||
if (fullscreen)
|
||||
@ -1010,13 +1010,13 @@ bool win32_set_video_mode(void *data,
|
||||
if (!win32_window_create(data, style,
|
||||
&mon_rect, width, height, fullscreen))
|
||||
return false;
|
||||
|
||||
|
||||
win32_set_window(&width, &height,
|
||||
fullscreen, windowed_full, &rect);
|
||||
|
||||
/* Wait until context is created (or failed to do so ...).
|
||||
* Please don't remove the (res = ) as GetMessage can return -1. */
|
||||
while (!g_inited && !g_quit
|
||||
while (!g_inited && !g_quit
|
||||
&& (res = GetMessage(&msg, main_window.hwnd, 0, 0)) != 0)
|
||||
{
|
||||
if (res == -1)
|
||||
@ -1063,7 +1063,7 @@ bool win32_has_focus(void)
|
||||
if (GetForegroundWindow() == main_window.hwnd)
|
||||
return true;
|
||||
#else
|
||||
const ui_window_t *window =
|
||||
const ui_window_t *window =
|
||||
ui_companion_driver_get_window_ptr();
|
||||
if (window)
|
||||
return window->focused(&main_window);
|
||||
@ -1109,14 +1109,14 @@ void win32_get_video_output_prev(
|
||||
|
||||
win32_get_video_output_size(&curr_width, &curr_height);
|
||||
|
||||
for (iModeNum = 0;
|
||||
EnumDisplaySettings(NULL, iModeNum, &dm) != 0;
|
||||
for (iModeNum = 0;
|
||||
EnumDisplaySettings(NULL, iModeNum, &dm) != 0;
|
||||
iModeNum++)
|
||||
{
|
||||
if ( dm.dmPelsWidth == curr_width
|
||||
if ( dm.dmPelsWidth == curr_width
|
||||
&& dm.dmPelsHeight == curr_height)
|
||||
{
|
||||
if ( prev_width != curr_width
|
||||
if ( prev_width != curr_width
|
||||
&& prev_height != curr_height)
|
||||
{
|
||||
found = true;
|
||||
@ -1130,8 +1130,8 @@ void win32_get_video_output_prev(
|
||||
|
||||
if (found)
|
||||
{
|
||||
*width = prev_width;
|
||||
*height = prev_height;
|
||||
*width = prev_width;
|
||||
*height = prev_height;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1149,8 +1149,8 @@ void win32_get_video_output_next(
|
||||
|
||||
win32_get_video_output_size(&curr_width, &curr_height);
|
||||
|
||||
for (iModeNum = 0;
|
||||
EnumDisplaySettings(NULL, iModeNum, &dm) != 0;
|
||||
for (iModeNum = 0;
|
||||
EnumDisplaySettings(NULL, iModeNum, &dm) != 0;
|
||||
iModeNum++)
|
||||
{
|
||||
if (found)
|
||||
@ -1160,7 +1160,7 @@ void win32_get_video_output_next(
|
||||
break;
|
||||
}
|
||||
|
||||
if ( dm.dmPelsWidth == curr_width
|
||||
if ( dm.dmPelsWidth == curr_width
|
||||
&& dm.dmPelsHeight == curr_height)
|
||||
found = true;
|
||||
}
|
||||
|
@ -51,6 +51,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <direct.h>
|
||||
#include <windows.h>
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1200
|
||||
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(VITA)
|
||||
#define SCE_ERROR_ERRNO_EEXIST 0x80010011
|
||||
|
@ -933,7 +933,7 @@ static bool command_event_cmd_exec(const char *data,
|
||||
content_info.environ_get = menu_content_environment_get;
|
||||
#endif
|
||||
|
||||
if (path_get(RARCH_PATH_CONTENT) != (void*)data)
|
||||
if (path_get(RARCH_PATH_CONTENT) != data)
|
||||
{
|
||||
path_clear(RARCH_PATH_CONTENT);
|
||||
if (!string_is_empty(data))
|
||||
|
Loading…
x
Reference in New Issue
Block a user