First iteration of UWP support
Enough to kind of run Working drivers: xinput, d3d11 Still missing: input driver with keyboard support, audio driver
@ -142,6 +142,7 @@ JuanVCS
|
||||
Justin Jacobs (dorkster)
|
||||
Justin Weiss (justinweiss)
|
||||
Ken Rossato (rossato)
|
||||
Krzysztof Haładyn (krzys_h)
|
||||
kurumushi
|
||||
kwyxz
|
||||
l3iggs
|
||||
|
@ -56,6 +56,10 @@
|
||||
|
||||
#include "record/record_driver.h"
|
||||
|
||||
#ifdef __WINRT__
|
||||
#include "uwp/uwp_func.h"
|
||||
#endif
|
||||
|
||||
static const char* invalid_filename_chars[] = {
|
||||
/* https://support.microsoft.com/en-us/help/905231/information-about-the-characters-that-you-cannot-use-in-site-names--fo */
|
||||
"~", "#", "%", "&", "*", "{", "}", "\\", ":", "[", "]", "?", "/", "|", "\'", "\"",
|
||||
@ -319,6 +323,12 @@ static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_WII;
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_WIIU;
|
||||
#elif defined(XENON)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_XENON360;
|
||||
#elif defined(HAVE_D3D12)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D12;
|
||||
#elif defined(HAVE_D3D11)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D11;
|
||||
#elif defined(HAVE_D3D10)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D10;
|
||||
#elif defined(HAVE_D3D9)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D9;
|
||||
#elif defined(HAVE_D3D8)
|
||||
@ -2221,8 +2231,13 @@ static config_file_t *open_default_config_file(void)
|
||||
|
||||
(void)path_size;
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
fill_pathname_application_path(app_path, path_size);
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#ifdef __WINRT__
|
||||
/* On UWP, the app install directory is not writable so use the writable LocalState dir instead */
|
||||
fill_pathname_home_dir(app_path, path_size);
|
||||
#else
|
||||
fill_pathname_application_dir(app_path, path_size);
|
||||
#endif
|
||||
fill_pathname_resolve_relative(conf_path, app_path,
|
||||
file_path_str(FILE_PATH_MAIN_CONFIG), path_size);
|
||||
|
||||
|
@ -306,6 +306,7 @@ static void libretro_get_environment_info(void (*func)(retro_environment_t),
|
||||
|
||||
static bool load_dynamic_core(void)
|
||||
{
|
||||
#ifndef __WINRT__ /* Can't lookup symbols in itself on UWP */
|
||||
function_t sym = dylib_proc(NULL, "retro_init");
|
||||
|
||||
if (sym)
|
||||
@ -319,6 +320,7 @@ static bool load_dynamic_core(void)
|
||||
RARCH_ERR("Proceeding could cause a crash. Aborting ...\n");
|
||||
retroarch_fail(1, "init_libretro_sym()");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (string_is_empty(path_get(RARCH_PATH_CORE)))
|
||||
{
|
||||
|
@ -43,6 +43,11 @@
|
||||
#include "../../verbosity.h"
|
||||
#include "../../ui/drivers/ui_win32.h"
|
||||
|
||||
#ifdef __WINRT__
|
||||
#include "../../uwp/uwp_func.h"
|
||||
#endif
|
||||
|
||||
#ifndef __WINRT__
|
||||
/* We only load this library once, so we let it be
|
||||
* unloaded at application shutdown, since unloading
|
||||
* it early seems to cause issues on some systems.
|
||||
@ -145,6 +150,7 @@ static void gfx_set_dwm(void)
|
||||
RARCH_ERR("Failed to set composition state ...\n");
|
||||
dwm_composition_disabled = settings->bools.video_disable_composition;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
|
||||
{
|
||||
@ -165,7 +171,9 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
|
||||
GetVersionEx((OSVERSIONINFO*)&vi);
|
||||
|
||||
server = vi.wProductType != VER_NT_WORKSTATION;
|
||||
#ifndef __WINRT__
|
||||
serverR2 = GetSystemMetrics(SM_SERVERR2);
|
||||
#endif
|
||||
|
||||
switch (si.wProcessorArchitecture)
|
||||
{
|
||||
@ -302,10 +310,19 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
|
||||
strlcat(s, " ", len);
|
||||
strlcat(s, vi.szCSDVersion, len);
|
||||
}
|
||||
|
||||
#ifdef __WINRT__
|
||||
if (!string_is_empty(uwp_device_family))
|
||||
{
|
||||
strlcat(s, " ", len);
|
||||
strlcat(s, uwp_device_family, len);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void frontend_win32_init(void *data)
|
||||
{
|
||||
#ifndef __WINRT__
|
||||
typedef BOOL (WINAPI *isProcessDPIAwareProc)();
|
||||
typedef BOOL (WINAPI *setProcessDPIAwareProc)();
|
||||
#ifdef HAVE_DYNAMIC
|
||||
@ -324,6 +341,7 @@ static void frontend_win32_init(void *data)
|
||||
if (!isDPIAwareProc())
|
||||
if (setDPIAwareProc)
|
||||
setDPIAwareProc();
|
||||
#endif
|
||||
}
|
||||
|
||||
enum frontend_powerstate frontend_win32_get_powerstate(int *seconds, int *percent)
|
||||
@ -385,13 +403,14 @@ enum frontend_architecture frontend_win32_get_architecture(void)
|
||||
static int frontend_win32_parse_drive_list(void *data, bool load_content)
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
enum msg_hash_enums enum_idx = load_content ?
|
||||
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
|
||||
MSG_UNKNOWN;
|
||||
#ifndef __WINRT__
|
||||
size_t i = 0;
|
||||
unsigned drives = GetLogicalDrives();
|
||||
char drive[] = " :\\";
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
enum msg_hash_enums enum_idx = load_content ?
|
||||
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
|
||||
MSG_UNKNOWN;
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
@ -403,6 +422,22 @@ static int frontend_win32_parse_drive_list(void *data, bool load_content)
|
||||
enum_idx,
|
||||
FILE_TYPE_DIRECTORY, 0, 0);
|
||||
}
|
||||
#else
|
||||
/* TODO (krzys_h): UWP storage sandboxing */
|
||||
|
||||
char *home_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
fill_pathname_home_dir(home_dir,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
menu_entries_append_enum(list,
|
||||
home_dir,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
||||
enum_idx,
|
||||
FILE_TYPE_DIRECTORY, 0, 0);
|
||||
|
||||
free(home_dir);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
@ -411,6 +446,7 @@ static int frontend_win32_parse_drive_list(void *data, bool load_content)
|
||||
static void frontend_win32_environment_get(int *argc, char *argv[],
|
||||
void *args, void *params_data)
|
||||
{
|
||||
#ifndef __WINRT__
|
||||
gfx_set_dwm();
|
||||
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_ASSETS],
|
||||
@ -459,6 +495,57 @@ static void frontend_win32_environment_get(int *argc, char *argv[],
|
||||
":\\states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
|
||||
":\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
||||
#else
|
||||
/* On UWP, we have to use the writable directory instead of the install directory */
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_ASSETS],
|
||||
"~\\assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER],
|
||||
"~\\filters\\audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
|
||||
"~\\filters\\video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CHEATS],
|
||||
"~\\cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_DATABASE],
|
||||
"~\\database\\rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CURSOR],
|
||||
"~\\database\\cursors", sizeof(g_defaults.dirs[DEFAULT_DIR_CURSOR]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_PLAYLIST],
|
||||
"~\\playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG],
|
||||
"~\\config\\record", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT],
|
||||
"~\\recordings", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG],
|
||||
"~\\config", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_REMAP],
|
||||
"~\\config\\remaps", sizeof(g_defaults.dirs[DEFAULT_DIR_REMAP]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS],
|
||||
"~\\assets\\wallpapers", sizeof(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS],
|
||||
"~\\thumbnails", sizeof(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_OVERLAY],
|
||||
"~\\overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY]));
|
||||
/* This one is an exception: cores have to be loaded from the install directory,
|
||||
* since this is the only place UWP apps can take .dlls from */
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE],
|
||||
":\\cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_INFO],
|
||||
"~\\info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG],
|
||||
"~\\autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SHADER],
|
||||
"~\\shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
|
||||
"~\\downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT],
|
||||
"~\\screenshots", sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SRAM],
|
||||
"~\\saves", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SAVESTATE],
|
||||
"~\\states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
|
||||
"~\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
||||
@ -502,6 +589,7 @@ static uint64_t frontend_win32_get_mem_used(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef __WINRT__
|
||||
static void frontend_win32_attach_console(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
@ -560,6 +648,7 @@ static void frontend_win32_detach_console(void)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
frontend_ctx_driver_t frontend_ctx_win32 = {
|
||||
frontend_win32_environment_get,
|
||||
@ -583,8 +672,13 @@ frontend_ctx_driver_t frontend_ctx_win32 = {
|
||||
NULL, /* get_sighandler_state */
|
||||
NULL, /* set_sighandler_state */
|
||||
NULL, /* destroy_sighandler_state */
|
||||
#ifndef __WINRT__
|
||||
frontend_win32_attach_console, /* attach_console */
|
||||
frontend_win32_detach_console, /* detach_console */
|
||||
#else
|
||||
NULL,
|
||||
NULL,
|
||||
#endif
|
||||
NULL, /* watch_path_for_changes */
|
||||
NULL, /* check_for_path_changes */
|
||||
NULL, /* set_sustained_performance_mode */
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "d3d10_common.h"
|
||||
#include "d3dcompiler_common.h"
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
#include <dynamic/dylib.h>
|
||||
|
||||
typedef HRESULT(WINAPI* PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN)(
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "d3d11_common.h"
|
||||
#include "d3dcompiler_common.h"
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
#include <dynamic/dylib.h>
|
||||
|
||||
HRESULT WINAPI D3D11CreateDeviceAndSwapChain(
|
||||
|
@ -2159,6 +2159,7 @@ static INLINE HRESULT D3D11ValidateContextForDispatch(D3D11Debug debug, D3D11Dev
|
||||
{
|
||||
return debug->lpVtbl->ValidateContextForDispatch(debug, context);
|
||||
}
|
||||
#ifndef __WINRT__
|
||||
static INLINE BOOL D3D11SetUseRef(D3D11SwitchToRef switch_to_ref, BOOL use_ref)
|
||||
{
|
||||
return switch_to_ref->lpVtbl->SetUseRef(switch_to_ref, use_ref);
|
||||
@ -2167,6 +2168,7 @@ static INLINE BOOL D3D11GetUseRef(D3D11SwitchToRef switch_to_ref)
|
||||
{
|
||||
return switch_to_ref->lpVtbl->GetUseRef(switch_to_ref);
|
||||
}
|
||||
#endif
|
||||
static INLINE HRESULT D3D11SetShaderTrackingOptionsByType(
|
||||
D3D11TracingDevice tracing_device, UINT resource_type_flags, UINT options)
|
||||
{
|
||||
@ -2188,6 +2190,7 @@ static INLINE void D3D11ClearStoredMessages(D3D11InfoQueue info_queue)
|
||||
{
|
||||
info_queue->lpVtbl->ClearStoredMessages(info_queue);
|
||||
}
|
||||
#ifndef __WINRT__
|
||||
static INLINE HRESULT D3D11GetMessageA(
|
||||
D3D11InfoQueue info_queue,
|
||||
UINT64 message_index,
|
||||
@ -2196,6 +2199,7 @@ static INLINE HRESULT D3D11GetMessageA(
|
||||
{
|
||||
return info_queue->lpVtbl->GetMessageA(info_queue, message_index, message, message_byte_length);
|
||||
}
|
||||
#endif
|
||||
static INLINE UINT64 D3D11GetNumMessagesAllowedByStorageFilter(D3D11InfoQueue info_queue)
|
||||
{
|
||||
return info_queue->lpVtbl->GetNumMessagesAllowedByStorageFilter(info_queue);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2014-2018 - Ali Bouhlel
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
@ -65,7 +65,7 @@ DEFINE_GUIDW(IID_ID3D12DebugCommandList, 0x09e0bf36, 0x54ac, 0x484f, 0x88, 0x47,
|
||||
/* clang-format on */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
static dylib_t d3d12_dll;
|
||||
static const char* d3d12_dll_name = "d3d12.dll";
|
||||
|
||||
|
@ -125,3 +125,28 @@ int32_t d3d_translate_filter(unsigned type)
|
||||
|
||||
return (int32_t)D3D_TEXTURE_FILTER_POINT;
|
||||
}
|
||||
|
||||
void d3d_input_driver(const char* input_name, const char* joypad_name, const input_driver_t** input, void** input_data)
|
||||
{
|
||||
#if defined(_XBOX) || defined(__WINRT__)
|
||||
void *xinput = input_xinput.init(joypad_name);
|
||||
*input = xinput ? (const input_driver_t*)&input_xinput : NULL;
|
||||
*input_data = xinput;
|
||||
#else
|
||||
#if _WIN32_WINNT >= 0x0501
|
||||
/* winraw only available since XP */
|
||||
if (string_is_equal(input_name, "raw"))
|
||||
{
|
||||
*input_data = input_winraw.init(joypad_name);
|
||||
if (*input_data)
|
||||
{
|
||||
*input = &input_winraw;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
*input_data = input_dinput.init(joypad_name);
|
||||
*input = *input_data ? &input_dinput : NULL;
|
||||
#endif
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#ifndef _XBOX
|
||||
#if !defined(_XBOX) && !defined(__WINRT__)
|
||||
#define HAVE_WINDOW
|
||||
#endif
|
||||
|
||||
@ -97,6 +97,8 @@ void *d3d_matrix_rotation_z(void *_pout, float angle);
|
||||
|
||||
int32_t d3d_translate_filter(unsigned type);
|
||||
|
||||
void d3d_input_driver(const char* input_name, const char* joypad_name, const input_driver_t** input, void** input_data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "d3dcompiler_common.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
#include <dynamic/dylib.h>
|
||||
|
||||
static dylib_t d3dcompiler_dll;
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "../video_driver.h"
|
||||
#include "win32_common.h"
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
#include <dynamic/dylib.h>
|
||||
|
||||
HRESULT WINAPI CreateDXGIFactory1(REFIID riid, void** ppFactory)
|
||||
@ -309,6 +309,7 @@ void dxgi_update_title(video_frame_info_t* video_info)
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
#ifndef __WINRT__
|
||||
MEMORYSTATUS stat;
|
||||
char mem[128];
|
||||
|
||||
@ -319,6 +320,7 @@ void dxgi_update_title(video_frame_info_t* video_info)
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", stat.dwAvailPhys / (1024.0f * 1024.0f),
|
||||
stat.dwTotalPhys / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (window)
|
||||
@ -329,32 +331,11 @@ void dxgi_update_title(video_frame_info_t* video_info)
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
#ifndef __WINRT__
|
||||
if (title[0])
|
||||
window->set_title(&main_window, title);
|
||||
}
|
||||
}
|
||||
|
||||
void dxgi_input_driver(const char* name, const input_driver_t** input, void** input_data)
|
||||
{
|
||||
#ifndef __WINRT__
|
||||
settings_t* settings = config_get_ptr();
|
||||
|
||||
#if _WIN32_WINNT >= 0x0501
|
||||
/* winraw only available since XP */
|
||||
if (string_is_equal(settings->arrays.input_driver, "raw"))
|
||||
{
|
||||
*input_data = input_winraw.init(name);
|
||||
if (*input_data)
|
||||
{
|
||||
*input = &input_winraw;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
*input_data = input_dinput.init(name);
|
||||
*input = *input_data ? &input_dinput : NULL;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
DXGI_FORMAT glslang_format_to_dxgi(glslang_format fmt)
|
||||
|
@ -444,6 +444,7 @@ static INLINE HRESULT DXGIGetAdapterDesc1(DXGIAdapter adapter, DXGI_ADAPTER_DESC
|
||||
{
|
||||
return adapter->lpVtbl->GetDesc1(adapter, desc);
|
||||
}
|
||||
#ifndef __WINRT__
|
||||
static INLINE ULONG DXGIReleaseDisplayControl(DXGIDisplayControl display_control)
|
||||
{
|
||||
return display_control->lpVtbl->Release(display_control);
|
||||
@ -612,6 +613,7 @@ static INLINE HRESULT DXGICheckPresentDurationSupport(
|
||||
swap_chain_media, desired_present_duration, closest_smaller_present_duration,
|
||||
closest_larger_present_duration);
|
||||
}
|
||||
#endif
|
||||
static INLINE ULONG DXGIReleaseSwapChain(DXGISwapChain swap_chain)
|
||||
{
|
||||
return swap_chain->lpVtbl->Release(swap_chain);
|
||||
@ -793,7 +795,6 @@ void dxgi_copy(
|
||||
void* dst_data);
|
||||
|
||||
void dxgi_update_title(video_frame_info_t* video_info);
|
||||
void dxgi_input_driver(const char* name, const input_driver_t** input, void** input_data);
|
||||
|
||||
DXGI_FORMAT glslang_format_to_dxgi(glslang_format fmt);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2014-2018 - Ali Bouhlel
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
@ -35,6 +35,10 @@
|
||||
#include "../../menu/menu_driver.h"
|
||||
#endif
|
||||
|
||||
#ifdef __WINRT__
|
||||
#error "UWP does not support D3D10"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
static void d3d10_free_overlays(d3d10_video_t* d3d10)
|
||||
{
|
||||
@ -556,8 +560,12 @@ static void d3d10_gfx_free(void* data)
|
||||
Release(d3d10->device);
|
||||
}
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
win32_monitor_from_window();
|
||||
#endif
|
||||
#ifdef HAVE_WINDOW
|
||||
win32_destroy_window();
|
||||
#endif
|
||||
free(d3d10);
|
||||
}
|
||||
|
||||
@ -566,31 +574,39 @@ d3d10_gfx_init(const video_info_t* video,
|
||||
const input_driver_t** input, void** input_data)
|
||||
{
|
||||
unsigned i;
|
||||
#ifdef HAVE_MONITOR
|
||||
MONITORINFOEX current_mon;
|
||||
HMONITOR hm_to_use;
|
||||
WNDCLASSEX wndclass = { 0 };
|
||||
#endif
|
||||
settings_t* settings = config_get_ptr();
|
||||
d3d10_video_t* d3d10 = (d3d10_video_t*)calloc(1, sizeof(*d3d10));
|
||||
|
||||
if (!d3d10)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_WINDOW
|
||||
win32_window_reset();
|
||||
win32_monitor_init();
|
||||
wndclass.lpfnWndProc = WndProcD3D;
|
||||
win32_window_init(&wndclass, true, NULL);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
win32_monitor_info(¤t_mon, &hm_to_use, &d3d10->cur_mon_id);
|
||||
#endif
|
||||
|
||||
d3d10->vp.full_width = video->width;
|
||||
d3d10->vp.full_height = video->height;
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
if (!d3d10->vp.full_width)
|
||||
d3d10->vp.full_width =
|
||||
current_mon.rcMonitor.right - current_mon.rcMonitor.left;
|
||||
if (!d3d10->vp.full_height)
|
||||
d3d10->vp.full_height =
|
||||
current_mon.rcMonitor.bottom - current_mon.rcMonitor.top;
|
||||
#endif
|
||||
|
||||
if (!win32_set_video_mode(d3d10,
|
||||
d3d10->vp.full_width, d3d10->vp.full_height, video->fullscreen))
|
||||
@ -598,7 +614,7 @@ d3d10_gfx_init(const video_info_t* video,
|
||||
RARCH_ERR("[D3D10]: win32_set_video_mode failed.\n");
|
||||
goto error;
|
||||
}
|
||||
dxgi_input_driver(settings->arrays.input_joypad_driver, input, input_data);
|
||||
d3d_input_driver(settings->arrays.input_driver, settings->arrays.input_joypad_driver, input, input_data);
|
||||
|
||||
{
|
||||
UINT flags = 0;
|
||||
@ -611,7 +627,9 @@ d3d10_gfx_init(const video_info_t* video,
|
||||
desc.BufferDesc.RefreshRate.Numerator = 60;
|
||||
desc.BufferDesc.RefreshRate.Denominator = 1;
|
||||
desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||
#if HAVE_WINDOW
|
||||
desc.OutputWindow = main_window.hwnd;
|
||||
#endif
|
||||
desc.SampleDesc.Count = 1;
|
||||
desc.SampleDesc.Quality = 0;
|
||||
desc.Windowed = TRUE;
|
||||
@ -1598,7 +1616,12 @@ static const video_poke_interface_t d3d10_poke_interface = {
|
||||
d3d10_gfx_load_texture,
|
||||
d3d10_gfx_unload_texture,
|
||||
NULL, /* set_video_mode */
|
||||
#ifndef __WINRT__
|
||||
win32_get_refresh_rate,
|
||||
#else
|
||||
/* UWP does not expose this information easily */
|
||||
NULL,
|
||||
#endif
|
||||
d3d10_set_filtering,
|
||||
NULL, /* get_video_output_size */
|
||||
NULL, /* get_video_output_prev */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2014-2018 - Ali Bouhlel
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
@ -41,6 +41,10 @@
|
||||
#include "../drivers_shader/slang_process.h"
|
||||
#endif
|
||||
|
||||
#ifdef __WINRT__
|
||||
#include "../../uwp/uwp_func.h"
|
||||
#endif
|
||||
|
||||
static D3D11Device cached_device_d3d11;
|
||||
static D3D_FEATURE_LEVEL cached_supportedFeatureLevel;
|
||||
static D3D11DeviceContext cached_context;
|
||||
@ -566,8 +570,12 @@ static void d3d11_gfx_free(void* data)
|
||||
Release(d3d11->device);
|
||||
}
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
win32_monitor_from_window();
|
||||
#endif
|
||||
#ifdef HAVE_WINDOW
|
||||
win32_destroy_window();
|
||||
#endif
|
||||
free(d3d11);
|
||||
}
|
||||
|
||||
@ -575,29 +583,37 @@ static void d3d11_gfx_free(void* data)
|
||||
d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data)
|
||||
{
|
||||
unsigned i;
|
||||
#ifdef HAVE_MONITOR
|
||||
MONITORINFOEX current_mon;
|
||||
HMONITOR hm_to_use;
|
||||
WNDCLASSEX wndclass = { 0 };
|
||||
#endif
|
||||
settings_t* settings = config_get_ptr();
|
||||
d3d11_video_t* d3d11 = (d3d11_video_t*)calloc(1, sizeof(*d3d11));
|
||||
|
||||
if (!d3d11)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_WINDOW
|
||||
win32_window_reset();
|
||||
win32_monitor_init();
|
||||
wndclass.lpfnWndProc = WndProcD3D;
|
||||
win32_window_init(&wndclass, true, NULL);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
win32_monitor_info(¤t_mon, &hm_to_use, &d3d11->cur_mon_id);
|
||||
#endif
|
||||
|
||||
d3d11->vp.full_width = video->width;
|
||||
d3d11->vp.full_height = video->height;
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
if (!d3d11->vp.full_width)
|
||||
d3d11->vp.full_width = current_mon.rcMonitor.right - current_mon.rcMonitor.left;
|
||||
if (!d3d11->vp.full_height)
|
||||
d3d11->vp.full_height = current_mon.rcMonitor.bottom - current_mon.rcMonitor.top;
|
||||
#endif
|
||||
|
||||
if (!win32_set_video_mode(d3d11, d3d11->vp.full_width, d3d11->vp.full_height, video->fullscreen))
|
||||
{
|
||||
@ -605,7 +621,7 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
goto error;
|
||||
}
|
||||
|
||||
dxgi_input_driver(settings->arrays.input_joypad_driver, input, input_data);
|
||||
d3d_input_driver(settings->arrays.input_driver, settings->arrays.input_joypad_driver, input, input_data);
|
||||
|
||||
{
|
||||
UINT flags = 0;
|
||||
@ -617,26 +633,45 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
D3D_FEATURE_LEVEL_10_0,
|
||||
D3D_FEATURE_LEVEL_9_3
|
||||
};
|
||||
#ifdef __WINRT__
|
||||
/* UWP requires the use of newer version of the factory which requires newer version of this struct */
|
||||
DXGI_SWAP_CHAIN_DESC1 desc = { 0 };
|
||||
#else
|
||||
DXGI_SWAP_CHAIN_DESC desc = { 0 };
|
||||
#endif
|
||||
UINT number_feature_levels = ARRAY_SIZE(requested_feature_levels);
|
||||
|
||||
desc.BufferCount = 1;
|
||||
#ifdef __WINRT__
|
||||
/* UWP forces us to do double-buffering */
|
||||
desc.BufferCount = 2;
|
||||
desc.Width = d3d11->vp.full_width;
|
||||
desc.Height = d3d11->vp.full_height;
|
||||
desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
#else
|
||||
desc.BufferCount = 1;
|
||||
desc.BufferDesc.Width = d3d11->vp.full_width;
|
||||
desc.BufferDesc.Height = d3d11->vp.full_height;
|
||||
desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
desc.BufferDesc.RefreshRate.Numerator = 60;
|
||||
desc.BufferDesc.RefreshRate.Denominator = 1;
|
||||
#endif
|
||||
desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||
#if HAVE_WINDOW
|
||||
desc.OutputWindow = main_window.hwnd;
|
||||
#endif
|
||||
desc.SampleDesc.Count = 1;
|
||||
desc.SampleDesc.Quality = 0;
|
||||
#if 0
|
||||
desc.Scaling = DXGI_SCALING_STRETCH;
|
||||
#endif
|
||||
#if HAVE_WINDOW
|
||||
desc.Windowed = TRUE;
|
||||
#endif
|
||||
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
|
||||
/* On phone, no swap effects are supported. */
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
|
||||
#elif defined(__WINRT__)
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
|
||||
#else
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL;
|
||||
#endif
|
||||
@ -646,37 +681,47 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
#endif
|
||||
if(cached_device_d3d11 && cached_context)
|
||||
{
|
||||
IDXGIFactory* dxgiFactory = NULL;
|
||||
IDXGIDevice* dxgiDevice = NULL;
|
||||
IDXGIAdapter* adapter = NULL;
|
||||
|
||||
d3d11->device = cached_device_d3d11;
|
||||
d3d11->context = cached_context;
|
||||
d3d11->supportedFeatureLevel = cached_supportedFeatureLevel;
|
||||
|
||||
d3d11->device->lpVtbl->QueryInterface(
|
||||
d3d11->device, uuidof(IDXGIDevice), (void**)&dxgiDevice);
|
||||
dxgiDevice->lpVtbl->GetAdapter(dxgiDevice, &adapter);
|
||||
adapter->lpVtbl->GetParent(
|
||||
adapter, uuidof(IDXGIFactory1), (void**)&dxgiFactory);
|
||||
dxgiFactory->lpVtbl->CreateSwapChain(
|
||||
dxgiFactory, (IUnknown*)d3d11->device,
|
||||
&desc, (IDXGISwapChain**)&d3d11->swapChain);
|
||||
|
||||
dxgiFactory->lpVtbl->Release(dxgiFactory);
|
||||
adapter->lpVtbl->Release(adapter);
|
||||
dxgiDevice->lpVtbl->Release(dxgiDevice);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FAILED(D3D11CreateDeviceAndSwapChain(
|
||||
if (FAILED(D3D11CreateDevice(
|
||||
NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags,
|
||||
requested_feature_levels, number_feature_levels,
|
||||
D3D11_SDK_VERSION, &desc,
|
||||
(IDXGISwapChain**)&d3d11->swapChain, &d3d11->device,
|
||||
D3D11_SDK_VERSION, &d3d11->device,
|
||||
&d3d11->supportedFeatureLevel, &d3d11->context)))
|
||||
goto error;
|
||||
}
|
||||
|
||||
IDXGIDevice* dxgiDevice = NULL;
|
||||
IDXGIAdapter* adapter = NULL;
|
||||
|
||||
d3d11->device->lpVtbl->QueryInterface(
|
||||
d3d11->device, uuidof(IDXGIDevice), (void**)&dxgiDevice);
|
||||
dxgiDevice->lpVtbl->GetAdapter(dxgiDevice, &adapter);
|
||||
#ifndef __WINRT__
|
||||
IDXGIFactory* dxgiFactory = NULL;
|
||||
adapter->lpVtbl->GetParent(
|
||||
adapter, uuidof(IDXGIFactory1), (void**)&dxgiFactory);
|
||||
if (FAILED(dxgiFactory->lpVtbl->CreateSwapChain(
|
||||
dxgiFactory, (IUnknown*)d3d11->device,
|
||||
&desc, (IDXGISwapChain**)&d3d11->swapChain)))
|
||||
goto error;
|
||||
#else
|
||||
IDXGIFactory2* dxgiFactory = NULL;
|
||||
adapter->lpVtbl->GetParent(
|
||||
adapter, uuidof(IDXGIFactory2), (void**)&dxgiFactory);
|
||||
if (FAILED(dxgiFactory->lpVtbl->CreateSwapChainForCoreWindow(
|
||||
dxgiFactory, (IUnknown*)d3d11->device, uwp_get_corewindow(),
|
||||
&desc, NULL, (IDXGISwapChain1**)&d3d11->swapChain)))
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
dxgiFactory->lpVtbl->Release(dxgiFactory);
|
||||
adapter->lpVtbl->Release(adapter);
|
||||
dxgiDevice->lpVtbl->Release(dxgiDevice);
|
||||
}
|
||||
|
||||
{
|
||||
@ -1142,6 +1187,11 @@ static bool d3d11_gfx_frame(
|
||||
video_driver_set_size(&video_info->width, &video_info->height);
|
||||
}
|
||||
|
||||
#ifdef __WINRT__
|
||||
/* UWP requires double-buffering, so make sure we bind to the appropariate backbuffer */
|
||||
D3D11SetRenderTargets(context, 1, &d3d11->renderTargetView, NULL);
|
||||
#endif
|
||||
|
||||
PERF_START();
|
||||
|
||||
#if 0 /* custom viewport doesn't call apply_state_changes, so we can't rely on this for now */
|
||||
@ -1622,7 +1672,12 @@ static const video_poke_interface_t d3d11_poke_interface = {
|
||||
d3d11_gfx_load_texture,
|
||||
d3d11_gfx_unload_texture,
|
||||
NULL, /* set_video_mode */
|
||||
#ifndef __WINRT__
|
||||
win32_get_refresh_rate,
|
||||
#else
|
||||
/* UWP does not expose this information easily */
|
||||
NULL,
|
||||
#endif
|
||||
d3d11_set_filtering,
|
||||
NULL, /* get_video_output_size */
|
||||
NULL, /* get_video_output_prev */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2014-2018 - Ali Bouhlel
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
@ -35,6 +35,10 @@
|
||||
|
||||
#include "wiiu/wiiu_dbg.h"
|
||||
|
||||
#ifdef __WINRT__
|
||||
#error "TODO (krzys_h): DX12 could be doable on UWP?"
|
||||
#endif
|
||||
|
||||
static void d3d12_gfx_sync(d3d12_video_t* d3d12)
|
||||
{
|
||||
if (D3D12GetCompletedValue(d3d12->queue.fence) < d3d12->queue.fenceValue)
|
||||
@ -864,8 +868,12 @@ static void d3d12_gfx_free(void* data)
|
||||
Release(d3d12->device);
|
||||
Release(d3d12->adapter);
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
win32_monitor_from_window();
|
||||
#endif
|
||||
#ifdef HAVE_WINDOW
|
||||
win32_destroy_window();
|
||||
#endif
|
||||
|
||||
free(d3d12);
|
||||
}
|
||||
@ -882,20 +890,26 @@ d3d12_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
if (!d3d12)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_WINDOW
|
||||
win32_window_reset();
|
||||
win32_monitor_init();
|
||||
wndclass.lpfnWndProc = WndProcD3D;
|
||||
win32_window_init(&wndclass, true, NULL);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
win32_monitor_info(¤t_mon, &hm_to_use, &d3d12->cur_mon_id);
|
||||
#endif
|
||||
|
||||
d3d12->vp.full_width = video->width;
|
||||
d3d12->vp.full_height = video->height;
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
if (!d3d12->vp.full_width)
|
||||
d3d12->vp.full_width = current_mon.rcMonitor.right - current_mon.rcMonitor.left;
|
||||
if (!d3d12->vp.full_height)
|
||||
d3d12->vp.full_height = current_mon.rcMonitor.bottom - current_mon.rcMonitor.top;
|
||||
#endif
|
||||
|
||||
if (!win32_set_video_mode(d3d12, d3d12->vp.full_width, d3d12->vp.full_height, video->fullscreen))
|
||||
{
|
||||
@ -903,7 +917,7 @@ d3d12_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
goto error;
|
||||
}
|
||||
|
||||
dxgi_input_driver(settings->arrays.input_joypad_driver, input, input_data);
|
||||
d3d_input_driver(settings->arrays.input_driver, settings->arrays.input_joypad_driver, input, input_data);
|
||||
|
||||
if (!d3d12_init_base(d3d12))
|
||||
goto error;
|
||||
@ -1764,7 +1778,12 @@ static const video_poke_interface_t d3d12_poke_interface = {
|
||||
d3d12_gfx_load_texture,
|
||||
d3d12_gfx_unload_texture,
|
||||
NULL, /* set_video_mode */
|
||||
#ifndef __WINRT__
|
||||
win32_get_refresh_rate,
|
||||
#else
|
||||
/* UWP does not expose this information easily */
|
||||
NULL,
|
||||
#endif
|
||||
d3d12_set_filtering,
|
||||
NULL, /* get_video_output_size */
|
||||
NULL, /* get_video_output_prev */
|
||||
|
@ -48,9 +48,11 @@
|
||||
#ifdef _XBOX
|
||||
#define D3D8_PRESENTATIONINTERVAL D3DRS_PRESENTATIONINTERVAL
|
||||
#else
|
||||
#ifndef __WINRT__
|
||||
#define HAVE_MONITOR
|
||||
#define HAVE_WINDOW
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "../../menu/menu_driver.h"
|
||||
@ -61,6 +63,10 @@
|
||||
#include "../../core.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef __WINRT__
|
||||
#error "UWP does not support D3D8"
|
||||
#endif
|
||||
|
||||
static LPDIRECT3D8 g_pD3D8;
|
||||
|
||||
#ifdef _XBOX
|
||||
@ -1137,37 +1143,6 @@ static void d3d8_set_osd_msg(void *data,
|
||||
d3d8_end_scene(d3d->dev);
|
||||
}
|
||||
|
||||
static void d3d8_input_driver(
|
||||
const input_driver_t **input, void **input_data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *name = settings ?
|
||||
settings->arrays.input_joypad_driver : NULL;
|
||||
#ifdef _XBOX
|
||||
void *xinput = input_xinput.init(name);
|
||||
*input = xinput ? (const input_driver_t*)&input_xinput : NULL;
|
||||
*input_data = xinput;
|
||||
#else
|
||||
#if _WIN32_WINNT >= 0x0501
|
||||
/* winraw only available since XP */
|
||||
if (string_is_equal(settings->arrays.input_driver, "raw"))
|
||||
{
|
||||
*input_data = input_winraw.init(name);
|
||||
if (*input_data)
|
||||
{
|
||||
*input = &input_winraw;
|
||||
dinput = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
dinput = input_dinput.init(name);
|
||||
*input = dinput ? &input_dinput : NULL;
|
||||
*input_data = dinput;
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool d3d8_init_internal(d3d8_video_t *d3d,
|
||||
const video_info_t *info, const input_driver_t **input,
|
||||
void **input_data)
|
||||
@ -1255,7 +1230,7 @@ static bool d3d8_init_internal(d3d8_video_t *d3d,
|
||||
if (!d3d8_initialize(d3d, &d3d->video_info))
|
||||
return false;
|
||||
|
||||
d3d8_input_driver(input, input_data);
|
||||
d3d_input_driver(settings->arrays.input_driver, settings->arrays.input_joypad_driver, input, input_data);
|
||||
|
||||
RARCH_LOG("[D3D8]: Init complete.\n");
|
||||
return true;
|
||||
@ -1888,9 +1863,10 @@ static const video_poke_interface_t d3d_poke_interface = {
|
||||
d3d8_load_texture,
|
||||
d3d8_unload_texture,
|
||||
d3d8_set_video_mode,
|
||||
#ifdef _XBOX
|
||||
#if defined(_XBOX) || defined(__WINRT__)
|
||||
NULL,
|
||||
#else
|
||||
/* UWP does not expose this information easily */
|
||||
win32_get_refresh_rate,
|
||||
#endif
|
||||
NULL,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2012-2014 - OV2
|
||||
@ -65,6 +65,10 @@
|
||||
#include "../../verbosity.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#ifdef __WINRT__
|
||||
#error "UWP does not support D3D9"
|
||||
#endif
|
||||
|
||||
static LPDIRECT3D9 g_pD3D9;
|
||||
|
||||
void *dinput;
|
||||
@ -1182,38 +1186,6 @@ static void d3d9_set_osd_msg(void *data,
|
||||
d3d9_end_scene(dev);
|
||||
}
|
||||
|
||||
static void d3d9_input_driver(
|
||||
const input_driver_t **input, void **input_data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *name = settings ?
|
||||
settings->arrays.input_joypad_driver : NULL;
|
||||
#ifdef _XBOX
|
||||
void *xinput = input_xinput.init(name);
|
||||
*input = xinput ? (const input_driver_t*)&input_xinput : NULL;
|
||||
*input_data = xinput;
|
||||
#else
|
||||
|
||||
#if _WIN32_WINNT >= 0x0501
|
||||
/* winraw only available since XP */
|
||||
if (string_is_equal(settings->arrays.input_driver, "raw"))
|
||||
{
|
||||
*input_data = input_winraw.init(name);
|
||||
if (*input_data)
|
||||
{
|
||||
*input = &input_winraw;
|
||||
dinput = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
dinput = input_dinput.init(name);
|
||||
*input = dinput ? &input_dinput : NULL;
|
||||
*input_data = dinput;
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool d3d9_init_internal(d3d9_video_t *d3d,
|
||||
const video_info_t *info, const input_driver_t **input,
|
||||
void **input_data)
|
||||
@ -1325,7 +1297,7 @@ static bool d3d9_init_internal(d3d9_video_t *d3d,
|
||||
if (!d3d9_initialize(d3d, &d3d->video_info))
|
||||
return false;
|
||||
|
||||
d3d9_input_driver(input, input_data);
|
||||
d3d_input_driver(settings->arrays.input_joypad_driver, input, input_data);
|
||||
|
||||
RARCH_LOG("[D3D9]: Init complete.\n");
|
||||
return true;
|
||||
@ -2054,9 +2026,10 @@ static const video_poke_interface_t d3d9_poke_interface = {
|
||||
d3d9_load_texture,
|
||||
d3d9_unload_texture,
|
||||
d3d9_set_video_mode,
|
||||
#ifdef _XBOX
|
||||
#if defined(_XBOX) || defined(__WINRT__)
|
||||
NULL,
|
||||
#else
|
||||
/* UWP does not expose this information easily */
|
||||
win32_get_refresh_rate,
|
||||
#endif
|
||||
NULL,
|
||||
|
@ -278,7 +278,7 @@ static bool vga_font_init_first(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
static const font_renderer_t *gdi_font_backends[] = {
|
||||
&gdi_font,
|
||||
NULL,
|
||||
@ -666,7 +666,7 @@ static bool font_init_first(
|
||||
return switch_font_init_first(font_driver, font_handle,
|
||||
video_data, font_path, font_size, is_threaded);
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
case FONT_DRIVER_RENDER_GDI:
|
||||
return gdi_font_init_first(font_driver, font_handle,
|
||||
video_data, font_path, font_size, is_threaded);
|
||||
|
@ -39,7 +39,7 @@ void* video_display_server_init(void)
|
||||
switch (type)
|
||||
{
|
||||
case RARCH_DISPLAY_WIN32:
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
current_display_server = &dispserv_win32;
|
||||
#endif
|
||||
break;
|
||||
|
@ -340,7 +340,7 @@ static const video_driver_t *video_drivers[] = {
|
||||
#ifdef HAVE_XSHM
|
||||
&video_xshm,
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
&video_gdi,
|
||||
#endif
|
||||
#ifdef DJGPP
|
||||
@ -416,7 +416,7 @@ static const gfx_ctx_driver_t *gfx_ctx_drivers[] = {
|
||||
#if defined(HAVE_VULKAN) && defined(HAVE_VULKAN_DISPLAY)
|
||||
&gfx_ctx_khr_display,
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
&gfx_ctx_gdi,
|
||||
#endif
|
||||
#ifdef HAVE_SIXEL
|
||||
|
@ -601,6 +601,8 @@ INPUT
|
||||
#elif defined(DJGPP)
|
||||
#include "../input/drivers/dos_input.c"
|
||||
#include "../input/drivers_joypad/dos_joypad.c"
|
||||
#elif defined(__WINRT__)
|
||||
#include "../input/drivers/xdk_xinput_input.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
@ -947,7 +949,7 @@ FRONTEND
|
||||
|
||||
#include "../frontend/frontend_driver.c"
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#include "../frontend/drivers/platform_win32.c"
|
||||
#endif
|
||||
|
||||
@ -1259,7 +1261,7 @@ MENU
|
||||
#include "../menu/drivers_display/menu_display_vga.c"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
#include "../menu/drivers_display/menu_display_gdi.c"
|
||||
#endif
|
||||
|
||||
|
@ -42,12 +42,20 @@
|
||||
|
||||
#ifdef HAVE_DINPUT
|
||||
#include "dinput_joypad.h"
|
||||
#else
|
||||
int g_xinput_pad_indexes[MAX_USERS];
|
||||
bool g_xinput_block_pads;
|
||||
#endif
|
||||
|
||||
#if defined(__WINRT__)
|
||||
#include <Xinput.h>
|
||||
#endif
|
||||
|
||||
/* Check if the definitions do not already exist.
|
||||
* Official and mingw xinput headers have different include guards.
|
||||
* Windows 10 API version doesn't have an include guard at all and just uses #pragma once instead
|
||||
*/
|
||||
#if ((!_XINPUT_H_) && (!__WINE_XINPUT_H))
|
||||
#if ((!_XINPUT_H_) && (!__WINE_XINPUT_H)) && !defined(__WINRT__)
|
||||
|
||||
#define XINPUT_GAMEPAD_DPAD_UP 0x0001
|
||||
#define XINPUT_GAMEPAD_DPAD_DOWN 0x0002
|
||||
@ -173,7 +181,7 @@ const char *xinput_joypad_name(unsigned pad)
|
||||
return XBOX_CONTROLLER_NAMES[xuser];
|
||||
}
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
static bool load_xinput_dll(void)
|
||||
{
|
||||
const char *version = "1.4";
|
||||
@ -210,7 +218,7 @@ static bool xinput_joypad_init(void *data)
|
||||
unsigned i, j;
|
||||
XINPUT_STATE dummy_state;
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
if (!g_xinput_dll)
|
||||
if (!load_xinput_dll())
|
||||
return false;
|
||||
@ -219,6 +227,9 @@ static bool xinput_joypad_init(void *data)
|
||||
* First try to load ordinal 100 (XInputGetStateEx).
|
||||
*/
|
||||
g_XInputGetStateEx = (XInputGetStateEx_t)dylib_proc(g_xinput_dll, (const char*)100);
|
||||
#elif defined(__WINRT__)
|
||||
/* XInputGetStateEx is not available on WinRT */
|
||||
g_XInputGetStateEx = NULL;
|
||||
#else
|
||||
g_XInputGetStateEx = (XInputGetStateEx_t)XInputGetStateEx;
|
||||
#endif
|
||||
@ -230,7 +241,7 @@ static bool xinput_joypad_init(void *data)
|
||||
* XInputGetState, at the cost of losing guide button support.
|
||||
*/
|
||||
g_xinput_guide_button_supported = false;
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
g_XInputGetStateEx = (XInputGetStateEx_t)dylib_proc(g_xinput_dll, "XInputGetState");
|
||||
#else
|
||||
g_XInputGetStateEx = (XInputGetStateEx_t)XInputGetState;
|
||||
@ -239,7 +250,7 @@ static bool xinput_joypad_init(void *data)
|
||||
if (!g_XInputGetStateEx)
|
||||
{
|
||||
RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n");
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
dylib_close(g_xinput_dll);
|
||||
#endif
|
||||
return false; /* DLL was loaded but did not contain the correct function. */
|
||||
@ -247,7 +258,7 @@ static bool xinput_joypad_init(void *data)
|
||||
RARCH_WARN("[XInput]: No guide button support.\n");
|
||||
}
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
g_XInputSetState = (XInputSetState_t)dylib_proc(g_xinput_dll, "XInputSetState");
|
||||
#else
|
||||
g_XInputSetState = (XInputSetState_t)XInputSetState;
|
||||
@ -255,7 +266,7 @@ static bool xinput_joypad_init(void *data)
|
||||
if (!g_XInputSetState)
|
||||
{
|
||||
RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n");
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
dylib_close(g_xinput_dll);
|
||||
#endif
|
||||
return false; /* DLL was loaded but did not contain the correct function. */
|
||||
@ -277,7 +288,7 @@ static bool xinput_joypad_init(void *data)
|
||||
(!g_xinput_states[1].connected) &&
|
||||
(!g_xinput_states[2].connected) &&
|
||||
(!g_xinput_states[3].connected))
|
||||
return false;
|
||||
return true;
|
||||
|
||||
RARCH_LOG("[XInput]: Pads connected: %d\n", g_xinput_states[0].connected +
|
||||
g_xinput_states[1].connected + g_xinput_states[2].connected + g_xinput_states[3].connected);
|
||||
@ -347,7 +358,7 @@ static void xinput_joypad_destroy(void)
|
||||
for (i = 0; i < 4; ++i)
|
||||
memset(&g_xinput_states[i], 0, sizeof(xinput_joypad_state));
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
|
||||
dylib_close(g_xinput_dll);
|
||||
|
||||
g_xinput_dll = NULL;
|
||||
@ -499,6 +510,7 @@ static void xinput_joypad_poll(void)
|
||||
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
#ifdef HAVE_DINPUT
|
||||
if (g_xinput_states[i].connected)
|
||||
{
|
||||
if (g_XInputGetStateEx && g_XInputGetStateEx(i,
|
||||
@ -506,6 +518,28 @@ static void xinput_joypad_poll(void)
|
||||
== ERROR_DEVICE_NOT_CONNECTED)
|
||||
g_xinput_states[i].connected = false;
|
||||
}
|
||||
#else
|
||||
/* Normally, dinput handles device insertion/removal for us, but
|
||||
* since dinput is not available on UWP we have to do it ourselves */
|
||||
/* Also note that on UWP, the controllers are not available on startup
|
||||
* and are instead 'plugged in' a moment later because Microsoft reasons */
|
||||
// TODO: This may be bad for performance?
|
||||
bool new_connected = g_XInputGetStateEx && g_XInputGetStateEx(i, &(g_xinput_states[i].xstate)) != ERROR_DEVICE_NOT_CONNECTED;
|
||||
if (new_connected != g_xinput_states[i].connected)
|
||||
{
|
||||
if (new_connected)
|
||||
{
|
||||
/* This is kinda ugly, but it's the same thing that dinput does */
|
||||
xinput_joypad_destroy();
|
||||
xinput_joypad_init(NULL);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_xinput_states[i].connected = new_connected;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_DINPUT
|
||||
|
@ -107,7 +107,7 @@ static const input_driver_t *input_drivers[] = {
|
||||
#ifdef XENON
|
||||
&input_xenon360,
|
||||
#endif
|
||||
#if defined(HAVE_XINPUT2) || defined(HAVE_XINPUT_XBOX1)
|
||||
#if defined(HAVE_XINPUT2) || defined(HAVE_XINPUT_XBOX1) || defined(__WINRT__)
|
||||
&input_xinput,
|
||||
#endif
|
||||
#ifdef GEKKO
|
||||
@ -137,7 +137,7 @@ static const input_driver_t *input_drivers[] = {
|
||||
#ifdef DJGPP
|
||||
&input_dos,
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(_XBOX) && _WIN32_WINNT >= 0x0501
|
||||
#if defined(_WIN32) && !defined(_XBOX) && _WIN32_WINNT >= 0x0501 && !defined(__WINRT__)
|
||||
/* winraw only available since XP */
|
||||
&input_winraw,
|
||||
#endif
|
||||
|
@ -1423,7 +1423,7 @@ const struct rarch_key_map rarch_key_map_dos[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && _WIN32_WINNT >= 0x0501
|
||||
#if defined(_WIN32) && _WIN32_WINNT >= 0x0501 && !defined(__WINRT__)
|
||||
const struct rarch_key_map rarch_key_map_winraw[] = {
|
||||
{ VK_BACK, RETROK_BACKSPACE },
|
||||
{ VK_TAB, RETROK_TAB },
|
||||
@ -1539,6 +1539,11 @@ const struct rarch_key_map rarch_key_map_winraw[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef __WINRT__
|
||||
/* Refer to uwp_main.cpp - on WinRT these constants are defined as C++ enum classes
|
||||
* so they can't be placed in a C source file */
|
||||
#endif
|
||||
|
||||
enum retro_key rarch_keysym_lut[RETROK_LAST];
|
||||
|
||||
/**
|
||||
|
@ -74,17 +74,42 @@ static void set_dl_error(void)
|
||||
dylib_t dylib_load(const char *path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#ifndef __WINRT__
|
||||
int prevmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
||||
#ifdef LEGACY_WIN32
|
||||
#endif
|
||||
#ifdef __WINRT__
|
||||
/* On UWP, you can only load DLLs inside your install directory, using a special function that takes a relative path */
|
||||
|
||||
if (!path_is_absolute(path))
|
||||
RARCH_WARN("Relative path in dylib_load! This is likely an attempt to load a system library that will fail\n");
|
||||
|
||||
char *relative_path_abbrev = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
fill_pathname_abbreviate_special(relative_path_abbrev, path, PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
char *relative_path = relative_path_abbrev;
|
||||
if (relative_path[0] != ':' || !path_char_is_slash(relative_path[1]))
|
||||
RARCH_WARN("Path to dylib_load is not inside app install directory! Loading will probably fail\n");
|
||||
else
|
||||
relative_path += 2;
|
||||
|
||||
RARCH_LOG("Loading library using a relative path: '%s'\n", relative_path);
|
||||
|
||||
wchar_t *pathW = utf8_to_utf16_string_alloc(relative_path);
|
||||
dylib_t lib = LoadPackagedLibrary(pathW, 0);
|
||||
free(pathW);
|
||||
|
||||
free(relative_path_abbrev);
|
||||
#elif defined(LEGACY_WIN32)
|
||||
dylib_t lib = LoadLibrary(path);
|
||||
#else
|
||||
wchar_t *pathW = utf8_to_utf16_string_alloc(path);
|
||||
dylib_t lib = LoadLibraryW(pathW);
|
||||
|
||||
free(pathW);
|
||||
#endif
|
||||
|
||||
#ifndef __WINRT__
|
||||
SetErrorMode(prevmode);
|
||||
#endif
|
||||
|
||||
if (!lib)
|
||||
{
|
||||
@ -114,8 +139,20 @@ function_t dylib_proc(dylib_t lib, const char *proc)
|
||||
function_t sym;
|
||||
|
||||
#ifdef _WIN32
|
||||
sym = (function_t)GetProcAddress(lib ?
|
||||
(HMODULE)lib : GetModuleHandle(NULL), proc);
|
||||
HMODULE mod = (HMODULE)lib;
|
||||
#ifndef __WINRT__
|
||||
if (!mod)
|
||||
mod = GetModuleHandle(NULL);
|
||||
#else
|
||||
/* GetModuleHandle is not available on UWP */
|
||||
if (!mod)
|
||||
{
|
||||
RARCH_WARN("FIXME: It's not possible to look up symbols in current executable on UWP!\n");
|
||||
DebugBreak();
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
sym = (function_t)GetProcAddress(mod, proc);
|
||||
if (!sym)
|
||||
{
|
||||
set_dl_error();
|
||||
|
@ -96,6 +96,12 @@
|
||||
#include <unistd.h> /* stat() is defined here */
|
||||
#endif
|
||||
|
||||
#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
|
||||
#ifdef __WINRT__
|
||||
#include <uwp/uwp_func.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Assume W-functions do not work below Win2K and Xbox platforms */
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500 || defined(_XBOX)
|
||||
|
||||
@ -1005,17 +1011,36 @@ void fill_pathname_expand_special(char *out_path,
|
||||
const char *in_path, size_t size)
|
||||
{
|
||||
#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
|
||||
if (*in_path == '~')
|
||||
if (in_path[0] == '~')
|
||||
{
|
||||
const char *home = getenv("HOME");
|
||||
if (home)
|
||||
char *home_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
home_dir[0] = '\0';
|
||||
|
||||
fill_pathname_home_dir(home_dir,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
if (*home_dir)
|
||||
{
|
||||
size_t src_size = strlcpy(out_path, home, size);
|
||||
size_t src_size = strlcpy(out_path, home_dir, size);
|
||||
retro_assert(src_size < size);
|
||||
|
||||
out_path += src_size;
|
||||
size -= src_size;
|
||||
in_path++;
|
||||
|
||||
if (
|
||||
(in_path[1] == '/')
|
||||
#ifdef _WIN32
|
||||
|| (in_path[1] == '\\')
|
||||
#endif
|
||||
)
|
||||
{
|
||||
in_path += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
in_path++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((in_path[0] == ':') &&
|
||||
@ -1027,23 +1052,24 @@ void fill_pathname_expand_special(char *out_path,
|
||||
)
|
||||
)
|
||||
{
|
||||
size_t src_size;
|
||||
char *application_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
application_dir[0] = '\0';
|
||||
|
||||
fill_pathname_application_path(application_dir,
|
||||
fill_pathname_application_dir(application_dir,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
path_basedir_wrapper(application_dir);
|
||||
|
||||
src_size = strlcpy(out_path, application_dir, size);
|
||||
retro_assert(src_size < size);
|
||||
if (*application_dir)
|
||||
{
|
||||
size_t src_size = strlcpy(out_path, application_dir, size);
|
||||
retro_assert(src_size < size);
|
||||
|
||||
free(application_dir);
|
||||
free(application_dir);
|
||||
|
||||
out_path += src_size;
|
||||
size -= src_size;
|
||||
in_path += 2;
|
||||
out_path += src_size;
|
||||
size -= src_size;
|
||||
in_path += 2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1058,7 +1084,7 @@ void fill_pathname_abbreviate_special(char *out_path,
|
||||
const char *candidates[3];
|
||||
const char *notations[3];
|
||||
char *application_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
const char *home = getenv("HOME");
|
||||
char *home_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
application_dir[0] = '\0';
|
||||
|
||||
@ -1070,16 +1096,17 @@ void fill_pathname_abbreviate_special(char *out_path,
|
||||
/* ugly hack - use application_dir pointer
|
||||
* before filling it in. C89 reasons */
|
||||
candidates[0] = application_dir;
|
||||
candidates[1] = home;
|
||||
candidates[1] = home_dir;
|
||||
candidates[2] = NULL;
|
||||
|
||||
notations [0] = ":";
|
||||
notations [1] = "~";
|
||||
notations [2] = NULL;
|
||||
|
||||
fill_pathname_application_path(application_dir,
|
||||
fill_pathname_application_dir(application_dir,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
fill_pathname_home_dir(home_dir,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
path_basedir_wrapper(application_dir);
|
||||
|
||||
for (i = 0; candidates[i]; i++)
|
||||
{
|
||||
@ -1107,6 +1134,7 @@ void fill_pathname_abbreviate_special(char *out_path,
|
||||
}
|
||||
|
||||
free(application_dir);
|
||||
free(home_dir);
|
||||
#endif
|
||||
|
||||
retro_assert(strlcpy(out_path, in_path, size) < size);
|
||||
@ -1148,7 +1176,7 @@ void fill_pathname_application_path(char *s, size_t len)
|
||||
CFBundleRef bundle = CFBundleGetMainBundle();
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
DWORD ret;
|
||||
DWORD ret = 0;
|
||||
wchar_t wstr[PATH_MAX_LENGTH] = {0};
|
||||
#endif
|
||||
#ifdef __HAIKU__
|
||||
@ -1160,11 +1188,11 @@ void fill_pathname_application_path(char *s, size_t len)
|
||||
if (!len)
|
||||
return;
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
#ifdef LEGACY_WIN32
|
||||
ret = GetModuleFileNameA(GetModuleHandle(NULL), s, len);
|
||||
ret = GetModuleFileNameA(NULL, s, len);
|
||||
#else
|
||||
ret = GetModuleFileNameW(GetModuleHandle(NULL), wstr, ARRAY_SIZE(wstr));
|
||||
ret = GetModuleFileNameW(NULL, wstr, ARRAY_SIZE(wstr));
|
||||
|
||||
if (*wstr)
|
||||
{
|
||||
@ -1233,4 +1261,27 @@ void fill_pathname_application_path(char *s, size_t len)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void fill_pathname_application_dir(char *s, size_t len)
|
||||
{
|
||||
#ifdef __WINRT__
|
||||
strlcpy(s, uwp_dir_install, len);
|
||||
#else
|
||||
fill_pathname_application_path(s, len);
|
||||
path_basedir_wrapper(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fill_pathname_home_dir(char *s, size_t len)
|
||||
{
|
||||
#ifdef __WINRT__
|
||||
strlcpy(s, uwp_dir_data, len);
|
||||
#else
|
||||
const char *home = getenv("HOME");
|
||||
if (home)
|
||||
strlcpy(s, home, len);
|
||||
else
|
||||
*s = 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -38,7 +38,7 @@ extern nbio_intf_t nbio_stdio;
|
||||
static nbio_intf_t *internal_nbio = &nbio_linux;
|
||||
#elif defined(HAVE_MMAP) && defined(BSD)
|
||||
static nbio_intf_t *internal_nbio = &nbio_mmap_unix;
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
#elif defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
static nbio_intf_t *internal_nbio = &nbio_mmap_win32;
|
||||
#else
|
||||
static nbio_intf_t *internal_nbio = &nbio_stdio;
|
||||
|
@ -462,6 +462,8 @@ void fill_pathname_slash(char *path, size_t size);
|
||||
|
||||
#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
|
||||
void fill_pathname_application_path(char *buf, size_t size);
|
||||
void fill_pathname_application_dir(char *buf, size_t size);
|
||||
void fill_pathname_home_dir(char *buf, size_t size);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -359,12 +359,14 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef __WINRT__
|
||||
if (settings->bools.menu_show_core_updater)
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_DELETE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CORE_DELETE),
|
||||
MENU_ENUM_LABEL_CORE_DELETE,
|
||||
MENU_SETTING_ACTION_CORE_DELETE, 0, 0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -3102,6 +3104,7 @@ static unsigned menu_displaylist_parse_options(
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
count++;
|
||||
#elif defined(HAVE_NETWORKING)
|
||||
#ifndef __WINRT__
|
||||
if (settings->bools.menu_show_core_updater)
|
||||
{
|
||||
menu_entries_append_enum(info->list,
|
||||
@ -3111,6 +3114,7 @@ static unsigned menu_displaylist_parse_options(
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
count++;
|
||||
}
|
||||
#endif
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST),
|
||||
@ -4150,7 +4154,7 @@ bool menu_displaylist_process(menu_displaylist_info_t *info)
|
||||
if (info->need_sort)
|
||||
file_list_sort_on_alt(info->list);
|
||||
|
||||
#if defined(HAVE_NETWORKING)
|
||||
#if defined(HAVE_NETWORKING) && !defined(__WINRT__)
|
||||
if (settings->bools.menu_show_core_updater && !settings->bools.kiosk_mode_enable)
|
||||
{
|
||||
if (info->download_core)
|
||||
|
@ -148,7 +148,7 @@ static menu_display_ctx_driver_t *menu_display_ctx_drivers[] = {
|
||||
#ifdef WIIU
|
||||
&menu_display_ctx_wiiu,
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
&menu_display_ctx_gdi,
|
||||
#endif
|
||||
#ifdef DJGPP
|
||||
|
51
pkg/msvc/RetroArch-msvc2017-UWP.sln
Normal file
@ -0,0 +1,51 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.168
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RetroArch-msvc2017-UWP", "msvc-2017-UWP\RetroArch-msvc2017-UWP.vcxproj", "{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|ARM = Release|ARM
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|x64.Build.0 = Debug|x64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|x86.Build.0 = Debug|Win32
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Debug|x86.Deploy.0 = Debug|Win32
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|ARM.Build.0 = Release|ARM
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|x64.ActiveCfg = Release|x64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|x64.Build.0 = Release|x64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|x64.Deploy.0 = Release|x64
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|x86.ActiveCfg = Release|Win32
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|x86.Build.0 = Release|Win32
|
||||
{F5E937B6-1BA0-4446-B94B-F3BBDEF908F4}.Release|x86.Deploy.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {2A811B94-2232-4C4E-A88E-33B0CDF139A2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
pkg/msvc/msvc-2017-UWP/Assets/LockScreenLogo.scale-200.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
pkg/msvc/msvc-2017-UWP/Assets/SplashScreen.scale-200.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
pkg/msvc/msvc-2017-UWP/Assets/Square150x150Logo.scale-200.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
pkg/msvc/msvc-2017-UWP/Assets/Square44x44Logo.scale-200.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
BIN
pkg/msvc/msvc-2017-UWP/Assets/StoreLogo.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
pkg/msvc/msvc-2017-UWP/Assets/Wide310x150Logo.scale-200.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
49
pkg/msvc/msvc-2017-UWP/Package.appxmanifest
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
IgnorableNamespaces="uap mp">
|
||||
|
||||
<Identity
|
||||
Name="1e4cf179-f3c2-404f-b9f3-cb2070a5aad8"
|
||||
Publisher="CN=krzys"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="1e4cf179-f3c2-404f-b9f3-cb2070a5aad8" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>msvc-2017-UWP</DisplayName>
|
||||
<PublisherDisplayName>krzys</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="msvc_2017_UWP.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="msvc-2017-UWP"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png"
|
||||
Description="msvc-2017-UWP"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
</Package>
|
506
pkg/msvc/msvc-2017-UWP/RetroArch-msvc2017-UWP.vcxproj
Normal file
@ -0,0 +1,506 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{f5e937b6-1ba0-4446-b94b-f3bbdef908f4}</ProjectGuid>
|
||||
<Keyword>DirectXApp</Keyword>
|
||||
<RootNamespace>RetroArchUWP</RootNamespace>
|
||||
<DefaultLanguage>pl-PL</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.15063.0</WindowsTargetPlatformMinVersion>
|
||||
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.props" />
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.props" />
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<PackageCertificateKeyFile>msvc-2017-UWP_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<Link>
|
||||
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; dxguid.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\rcheevos\include;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MAIN;HAVE_DYNAMIC;HAVE_XAUDIO2;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D11;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_XINPUT;HAVE_XINPUT2;HAVE_XAUDIO;HAVE_DIRECTX;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_MENU;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;HAVE_STATIC_DUMMY;HAVE_STATIC_VIDEO_FILTERS;HAVE_STATIC_AUDIO_FILTERS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<Link>
|
||||
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; dxguid.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\rcheevos\include;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MAIN;HAVE_DYNAMIC;HAVE_XAUDIO2;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D11;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_XINPUT;HAVE_XINPUT2;HAVE_XAUDIO;HAVE_DIRECTX;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;HAVE_STATIC_DUMMY;HAVE_STATIC_VIDEO_FILTERS;HAVE_STATIC_AUDIO_FILTERS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; dxguid.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm64; $(VCInstallDir)\lib\arm64</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\rcheevos\include;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MAIN;HAVE_DYNAMIC;HAVE_XAUDIO2;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D11;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_XINPUT;HAVE_XINPUT2;HAVE_XAUDIO;HAVE_DIRECTX;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_MENU;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;HAVE_STATIC_DUMMY;HAVE_STATIC_VIDEO_FILTERS;HAVE_STATIC_AUDIO_FILTERS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; dxguid.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm64; $(VCInstallDir)\lib\arm64</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\rcheevos\include;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MAIN;HAVE_DYNAMIC;HAVE_XAUDIO2;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D11;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_XINPUT;HAVE_XINPUT2;HAVE_XAUDIO;HAVE_DIRECTX;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;HAVE_STATIC_DUMMY;HAVE_STATIC_VIDEO_FILTERS;HAVE_STATIC_AUDIO_FILTERS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; dxguid.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\rcheevos\include;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MAIN;HAVE_DYNAMIC;HAVE_XAUDIO2;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D11;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_XINPUT;HAVE_XINPUT2;HAVE_XAUDIO;HAVE_DIRECTX;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_MENU;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;HAVE_STATIC_DUMMY;HAVE_STATIC_VIDEO_FILTERS;HAVE_STATIC_AUDIO_FILTERS</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; dxguid.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\rcheevos\include;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MAIN;HAVE_DYNAMIC;HAVE_XAUDIO2;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D11;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_XINPUT;HAVE_XINPUT2;HAVE_XAUDIO;HAVE_DIRECTX;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;HAVE_STATIC_DUMMY;HAVE_STATIC_VIDEO_FILTERS;HAVE_STATIC_AUDIO_FILTERS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; dxguid.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\rcheevos\include;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MAIN;HAVE_DYNAMIC;HAVE_XAUDIO2;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D11;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_XINPUT;HAVE_XINPUT2;HAVE_XAUDIO;HAVE_DIRECTX;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_MENU;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;HAVE_STATIC_DUMMY;HAVE_STATIC_VIDEO_FILTERS;HAVE_STATIC_AUDIO_FILTERS</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; dxguid.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\rcheevos\include;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MAIN;HAVE_DYNAMIC;HAVE_XAUDIO2;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D11;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_XINPUT;HAVE_XINPUT2;HAVE_XAUDIO;HAVE_DIRECTX;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;HAVE_STATIC_DUMMY;HAVE_STATIC_VIDEO_FILTERS;HAVE_STATIC_AUDIO_FILTERS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Assets\LockScreenLogo.scale-200.png" />
|
||||
<Image Include="Assets\SplashScreen.scale-200.png" />
|
||||
<Image Include="Assets\Square150x150Logo.scale-200.png" />
|
||||
<Image Include="Assets\Square44x44Logo.scale-200.png" />
|
||||
<Image Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||
<Image Include="Assets\StoreLogo.png" />
|
||||
<Image Include="Assets\Wide310x150Logo.scale-200.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\griffin\griffin.c">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\griffin\griffin_cpp.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\uwp\uwp_main.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
<None Include="avcodec-57.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="avformat-57.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="avutil-55.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="cores\mednafen_snes_libretro.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="cores\pcsx_rearmed_libretro.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libass-9.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libbluray-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libbz2-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libcelt0-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="LIBEAY32.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libexpat-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libffi-6.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libfontconfig-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libfreetype-6.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libfribidi-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libgcc_s_seh-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libglib-2.0-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libgmp-10.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libgnutls-30.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libgraphite2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libgsm.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libharfbuzz-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libhogweed-4.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libiconv-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libicudt58.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libicuin58.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libicuuc58.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libidn2-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libintl-8.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libjasper-4.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libjpeg-8.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="liblcms2-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="liblzma-5.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libmng-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libmodplug-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libmp3lame-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libnettle-6.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libogg-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libopencore-amrnb-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libopencore-amrwb-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libopenjp2-7.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libopus-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libp11-kit-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libpcre-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libpcre2-16-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libpng16-16.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="librtmp-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libspeex-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libstdc++-6.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libtasn1-6.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libtheoradec-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libtheoraenc-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libtiff-5.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libunistring-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libvorbis-0.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libvorbisenc-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libvpx-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libwavpack-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libwebp-7.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libwebpdemux-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libwebpmux-3.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libwinpthread-1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libx264-155.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libx265.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="libxml2-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="msvc-2017-UWP_TemporaryKey.pfx" />
|
||||
<None Include="SSLEAY32.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="swresample-2.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="swscale-4.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="xvidcore.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="zlib1.dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\uwp\uwp_func.h" />
|
||||
<ClInclude Include="..\..\..\uwp\uwp_main.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.targets" />
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.targets" />
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
280
pkg/msvc/msvc-2017-UWP/RetroArch-msvc2017-UWP.vcxproj.filters
Normal file
@ -0,0 +1,280 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="uwp">
|
||||
<UniqueIdentifier>{1246fa09-e114-4a52-88c2-657b2f13d9fb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="griffin">
|
||||
<UniqueIdentifier>{32de9679-6494-4933-afa2-430fd975e506}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="cores">
|
||||
<UniqueIdentifier>{73676219-cf54-454f-b6fa-9b192c1454f8}</UniqueIdentifier>
|
||||
<Extensions>
|
||||
</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="core_deps">
|
||||
<UniqueIdentifier>{bf1e643d-c518-4a77-a355-ae8a93efc18b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="assets">
|
||||
<UniqueIdentifier>{ba77ad30-f536-4bb8-ad9d-2870e8a9bd39}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Assets\LockScreenLogo.scale-200.png">
|
||||
<Filter>assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\SplashScreen.scale-200.png">
|
||||
<Filter>assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square44x44Logo.scale-200.png">
|
||||
<Filter>assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png">
|
||||
<Filter>assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square150x150Logo.scale-200.png">
|
||||
<Filter>assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\StoreLogo.png">
|
||||
<Filter>assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Wide310x150Logo.scale-200.png">
|
||||
<Filter>assets</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="msvc-2017-UWP_TemporaryKey.pfx" />
|
||||
<None Include="libwinpthread-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="cores\mednafen_snes_libretro.dll">
|
||||
<Filter>cores</Filter>
|
||||
</None>
|
||||
<None Include="cores\pcsx_rearmed_libretro.dll">
|
||||
<Filter>cores</Filter>
|
||||
</None>
|
||||
<None Include="zlib1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="avcodec-57.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="avformat-57.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="avutil-55.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libass-9.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libbluray-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libbz2-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libcelt0-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="LIBEAY32.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libexpat-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libffi-6.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libfontconfig-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libfreetype-6.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libfribidi-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libgcc_s_seh-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libglib-2.0-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libgmp-10.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libgnutls-30.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libgraphite2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libgsm.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libharfbuzz-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libhogweed-4.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libiconv-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libicudt58.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libicuin58.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libicuuc58.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libidn2-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libintl-8.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libjasper-4.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libjpeg-8.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="liblcms2-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="liblzma-5.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libmng-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libmodplug-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libmp3lame-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libnettle-6.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libogg-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libopencore-amrnb-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libopencore-amrwb-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libopenjp2-7.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libopus-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libp11-kit-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libpcre-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libpcre2-16-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libpng16-16.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="librtmp-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libspeex-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libstdc++-6.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libtasn1-6.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libtheoradec-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libtheoraenc-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libtiff-5.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libunistring-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libvorbis-0.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libvorbisenc-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libvpx-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libwavpack-1.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libwebp-7.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libwebpdemux-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libwebpmux-3.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libx264-155.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libx265.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="libxml2-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="SSLEAY32.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="swresample-2.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="swscale-4.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
<None Include="xvidcore.dll">
|
||||
<Filter>core_deps</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\uwp\uwp_main.h">
|
||||
<Filter>uwp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\uwp\uwp_func.h">
|
||||
<Filter>uwp</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\griffin\griffin.c">
|
||||
<Filter>griffin</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\griffin\griffin_cpp.cpp">
|
||||
<Filter>griffin</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\uwp\uwp_main.cpp">
|
||||
<Filter>uwp</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
BIN
pkg/msvc/msvc-2017-UWP/msvc-2017-UWP_TemporaryKey.pfx
Normal file
@ -27,7 +27,7 @@
|
||||
#include "ui_companion_driver.h"
|
||||
|
||||
static const ui_companion_driver_t *ui_companion_drivers[] = {
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
&ui_companion_win32,
|
||||
#endif
|
||||
#if defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL)
|
||||
|
35
uwp/uwp_func.h
Normal file
@ -0,0 +1,35 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2018 - Krzysztof Haładyn
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _UWP_FUNC_H
|
||||
#define _UWP_FUNC_H
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern char uwp_dir_install[PATH_MAX_LENGTH];
|
||||
extern char uwp_dir_data[PATH_MAX_LENGTH];
|
||||
extern char uwp_device_family[128];
|
||||
|
||||
void* uwp_get_corewindow(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif _UWP_FUNC_H
|
479
uwp/uwp_main.cpp
Normal file
@ -0,0 +1,479 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2018 - Krzysztof Haładyn
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "uwp_main.h"
|
||||
#include <retroarch.h>
|
||||
#include <queues/task_queue.h>
|
||||
#include <retro_timers.h>
|
||||
#include <frontend/frontend.h>
|
||||
#include <input/input_keymaps.h>
|
||||
#include <input/input_driver.h>
|
||||
#include <verbosity.h>
|
||||
#include "uwp_func.h"
|
||||
|
||||
#include <ppltasks.h>
|
||||
|
||||
using namespace RetroArchUWP;
|
||||
|
||||
using namespace concurrency;
|
||||
using namespace Windows::ApplicationModel;
|
||||
using namespace Windows::ApplicationModel::Core;
|
||||
using namespace Windows::ApplicationModel::Activation;
|
||||
using namespace Windows::UI::Core;
|
||||
using namespace Windows::UI::Input;
|
||||
using namespace Windows::UI::ViewManagement;
|
||||
using namespace Windows::System;
|
||||
using namespace Windows::System::Profile;
|
||||
using namespace Windows::Foundation;
|
||||
using namespace Windows::Graphics::Display;
|
||||
|
||||
char uwp_dir_install[PATH_MAX_LENGTH];
|
||||
char uwp_dir_data[PATH_MAX_LENGTH];
|
||||
char uwp_device_family[128];
|
||||
|
||||
// Some keys are unavailable in the VirtualKey enum (wtf) but the old-style constants work
|
||||
const struct rarch_key_map rarch_key_map_uwp[] = {
|
||||
{ (unsigned int)VirtualKey::Back, RETROK_BACKSPACE },
|
||||
{ (unsigned int)VirtualKey::Tab, RETROK_TAB },
|
||||
{ (unsigned int)VirtualKey::Clear, RETROK_CLEAR },
|
||||
{ (unsigned int)VirtualKey::Enter, RETROK_RETURN },
|
||||
{ (unsigned int)VirtualKey::Pause, RETROK_PAUSE },
|
||||
{ (unsigned int)VirtualKey::Escape, RETROK_ESCAPE },
|
||||
{ (unsigned int)VirtualKey::ModeChange, RETROK_MODE },
|
||||
{ (unsigned int)VirtualKey::Space, RETROK_SPACE },
|
||||
{ (unsigned int)VirtualKey::PageUp, RETROK_PAGEUP },
|
||||
{ (unsigned int)VirtualKey::PageDown, RETROK_PAGEDOWN },
|
||||
{ (unsigned int)VirtualKey::End, RETROK_END },
|
||||
{ (unsigned int)VirtualKey::Home, RETROK_HOME },
|
||||
{ (unsigned int)VirtualKey::Left, RETROK_LEFT },
|
||||
{ (unsigned int)VirtualKey::Up, RETROK_UP },
|
||||
{ (unsigned int)VirtualKey::Right, RETROK_RIGHT },
|
||||
{ (unsigned int)VirtualKey::Down, RETROK_DOWN },
|
||||
{ (unsigned int)VirtualKey::Print, RETROK_PRINT },
|
||||
{ (unsigned int)VirtualKey::Insert, RETROK_INSERT },
|
||||
{ (unsigned int)VirtualKey::Delete, RETROK_DELETE },
|
||||
{ (unsigned int)VirtualKey::Help, RETROK_HELP },
|
||||
{ (unsigned int)VirtualKey::Number0, RETROK_0 },
|
||||
{ (unsigned int)VirtualKey::Number1, RETROK_1 },
|
||||
{ (unsigned int)VirtualKey::Number2, RETROK_2 },
|
||||
{ (unsigned int)VirtualKey::Number3, RETROK_3 },
|
||||
{ (unsigned int)VirtualKey::Number4, RETROK_4 },
|
||||
{ (unsigned int)VirtualKey::Number5, RETROK_5 },
|
||||
{ (unsigned int)VirtualKey::Number6, RETROK_6 },
|
||||
{ (unsigned int)VirtualKey::Number7, RETROK_7 },
|
||||
{ (unsigned int)VirtualKey::Number8, RETROK_8 },
|
||||
{ (unsigned int)VirtualKey::Number9, RETROK_9 },
|
||||
{ (unsigned int)VirtualKey::A, RETROK_a },
|
||||
{ (unsigned int)VirtualKey::B, RETROK_b },
|
||||
{ (unsigned int)VirtualKey::C, RETROK_c },
|
||||
{ (unsigned int)VirtualKey::D, RETROK_d },
|
||||
{ (unsigned int)VirtualKey::E, RETROK_e },
|
||||
{ (unsigned int)VirtualKey::F, RETROK_f },
|
||||
{ (unsigned int)VirtualKey::G, RETROK_g },
|
||||
{ (unsigned int)VirtualKey::H, RETROK_h },
|
||||
{ (unsigned int)VirtualKey::I, RETROK_i },
|
||||
{ (unsigned int)VirtualKey::J, RETROK_j },
|
||||
{ (unsigned int)VirtualKey::K, RETROK_k },
|
||||
{ (unsigned int)VirtualKey::L, RETROK_l },
|
||||
{ (unsigned int)VirtualKey::M, RETROK_m },
|
||||
{ (unsigned int)VirtualKey::N, RETROK_n },
|
||||
{ (unsigned int)VirtualKey::O, RETROK_o },
|
||||
{ (unsigned int)VirtualKey::P, RETROK_p },
|
||||
{ (unsigned int)VirtualKey::Q, RETROK_q },
|
||||
{ (unsigned int)VirtualKey::R, RETROK_r },
|
||||
{ (unsigned int)VirtualKey::S, RETROK_s },
|
||||
{ (unsigned int)VirtualKey::T, RETROK_t },
|
||||
{ (unsigned int)VirtualKey::U, RETROK_u },
|
||||
{ (unsigned int)VirtualKey::V, RETROK_v },
|
||||
{ (unsigned int)VirtualKey::W, RETROK_w },
|
||||
{ (unsigned int)VirtualKey::X, RETROK_x },
|
||||
{ (unsigned int)VirtualKey::Y, RETROK_y },
|
||||
{ (unsigned int)VirtualKey::Z, RETROK_z },
|
||||
{ (unsigned int)VirtualKey::LeftWindows, RETROK_LSUPER },
|
||||
{ (unsigned int)VirtualKey::RightWindows, RETROK_RSUPER },
|
||||
{ (unsigned int)VirtualKey::Application, RETROK_MENU },
|
||||
{ (unsigned int)VirtualKey::NumberPad0, RETROK_KP0 },
|
||||
{ (unsigned int)VirtualKey::NumberPad1, RETROK_KP1 },
|
||||
{ (unsigned int)VirtualKey::NumberPad2, RETROK_KP2 },
|
||||
{ (unsigned int)VirtualKey::NumberPad3, RETROK_KP3 },
|
||||
{ (unsigned int)VirtualKey::NumberPad4, RETROK_KP4 },
|
||||
{ (unsigned int)VirtualKey::NumberPad5, RETROK_KP5 },
|
||||
{ (unsigned int)VirtualKey::NumberPad6, RETROK_KP6 },
|
||||
{ (unsigned int)VirtualKey::NumberPad7, RETROK_KP7 },
|
||||
{ (unsigned int)VirtualKey::NumberPad8, RETROK_KP8 },
|
||||
{ (unsigned int)VirtualKey::NumberPad9, RETROK_KP9 },
|
||||
{ (unsigned int)VirtualKey::Multiply, RETROK_KP_MULTIPLY },
|
||||
{ (unsigned int)VirtualKey::Add, RETROK_KP_PLUS },
|
||||
{ (unsigned int)VirtualKey::Subtract, RETROK_KP_MINUS },
|
||||
{ (unsigned int)VirtualKey::Decimal, RETROK_KP_PERIOD },
|
||||
{ (unsigned int)VirtualKey::Divide, RETROK_KP_DIVIDE },
|
||||
{ (unsigned int)VirtualKey::F1, RETROK_F1 },
|
||||
{ (unsigned int)VirtualKey::F2, RETROK_F2 },
|
||||
{ (unsigned int)VirtualKey::F3, RETROK_F3 },
|
||||
{ (unsigned int)VirtualKey::F4, RETROK_F4 },
|
||||
{ (unsigned int)VirtualKey::F5, RETROK_F5 },
|
||||
{ (unsigned int)VirtualKey::F6, RETROK_F6 },
|
||||
{ (unsigned int)VirtualKey::F7, RETROK_F7 },
|
||||
{ (unsigned int)VirtualKey::F8, RETROK_F8 },
|
||||
{ (unsigned int)VirtualKey::F9, RETROK_F9 },
|
||||
{ (unsigned int)VirtualKey::F10, RETROK_F10 },
|
||||
{ (unsigned int)VirtualKey::F11, RETROK_F11 },
|
||||
{ (unsigned int)VirtualKey::F12, RETROK_F12 },
|
||||
{ (unsigned int)VirtualKey::F13, RETROK_F13 },
|
||||
{ (unsigned int)VirtualKey::F14, RETROK_F14 },
|
||||
{ (unsigned int)VirtualKey::F15, RETROK_F15 },
|
||||
{ (unsigned int)VirtualKey::NumberKeyLock, RETROK_NUMLOCK },
|
||||
{ (unsigned int)VirtualKey::Scroll, RETROK_SCROLLOCK },
|
||||
{ (unsigned int)VirtualKey::LeftShift, RETROK_LSHIFT },
|
||||
{ (unsigned int)VirtualKey::RightShift, RETROK_RSHIFT },
|
||||
{ (unsigned int)VirtualKey::LeftControl, RETROK_LCTRL },
|
||||
{ (unsigned int)VirtualKey::RightControl, RETROK_RCTRL },
|
||||
{ (unsigned int)VirtualKey::LeftMenu, RETROK_LALT },
|
||||
{ (unsigned int)VirtualKey::RightMenu, RETROK_RALT },
|
||||
{ VK_RETURN, RETROK_KP_ENTER },
|
||||
{ (unsigned int)VirtualKey::CapitalLock, RETROK_CAPSLOCK },
|
||||
{ VK_OEM_1, RETROK_SEMICOLON },
|
||||
{ VK_OEM_PLUS, RETROK_EQUALS },
|
||||
{ VK_OEM_COMMA, RETROK_COMMA },
|
||||
{ VK_OEM_MINUS, RETROK_MINUS },
|
||||
{ VK_OEM_PERIOD, RETROK_PERIOD },
|
||||
{ VK_OEM_2, RETROK_SLASH },
|
||||
{ VK_OEM_3, RETROK_BACKQUOTE },
|
||||
{ VK_OEM_4, RETROK_LEFTBRACKET },
|
||||
{ VK_OEM_5, RETROK_BACKSLASH },
|
||||
{ VK_OEM_6, RETROK_RIGHTBRACKET },
|
||||
{ VK_OEM_7, RETROK_QUOTE },
|
||||
{ 0, RETROK_UNKNOWN }
|
||||
};
|
||||
|
||||
// The main function is only used to initialize our IFrameworkView class.
|
||||
[Platform::MTAThread]
|
||||
int main(Platform::Array<Platform::String^>^)
|
||||
{
|
||||
Platform::String^ install_dir = Windows::ApplicationModel::Package::Current->InstalledLocation->Path + L"\\";
|
||||
wcstombs(uwp_dir_install, install_dir->Data(), PATH_MAX_LENGTH);
|
||||
Platform::String^ data_dir = Windows::Storage::ApplicationData::Current->LocalFolder->Path + L"\\";
|
||||
wcstombs(uwp_dir_data, data_dir->Data(), PATH_MAX_LENGTH);
|
||||
|
||||
wcstombs(uwp_device_family, AnalyticsInfo::VersionInfo->DeviceFamily->Data(), 128);
|
||||
|
||||
RARCH_LOG("Data dir: %ls\n", data_dir->Data());
|
||||
RARCH_LOG("Install dir: %ls\n", install_dir->Data());
|
||||
|
||||
auto direct3DApplicationSource = ref new Direct3DApplicationSource();
|
||||
CoreApplication::Run(direct3DApplicationSource);
|
||||
return 0;
|
||||
}
|
||||
|
||||
IFrameworkView^ Direct3DApplicationSource::CreateView()
|
||||
{
|
||||
return ref new App();
|
||||
}
|
||||
|
||||
App^ App::m_instance;
|
||||
|
||||
App::App() :
|
||||
m_initialized(false),
|
||||
m_windowClosed(false),
|
||||
m_windowVisible(true),
|
||||
m_windowFocused(true),
|
||||
m_windowResized(false)
|
||||
{
|
||||
m_instance = this;
|
||||
}
|
||||
|
||||
// The first method called when the IFrameworkView is being created.
|
||||
void App::Initialize(CoreApplicationView^ applicationView)
|
||||
{
|
||||
// Register event handlers for app lifecycle. This example includes Activated, so that we
|
||||
// can make the CoreWindow active and start rendering on the window.
|
||||
applicationView->Activated +=
|
||||
ref new TypedEventHandler<CoreApplicationView^, IActivatedEventArgs^>(this, &App::OnActivated);
|
||||
|
||||
CoreApplication::Suspending +=
|
||||
ref new EventHandler<SuspendingEventArgs^>(this, &App::OnSuspending);
|
||||
|
||||
CoreApplication::Resuming +=
|
||||
ref new EventHandler<Platform::Object^>(this, &App::OnResuming);
|
||||
}
|
||||
|
||||
// Called when the CoreWindow object is created (or re-created).
|
||||
void App::SetWindow(CoreWindow^ window)
|
||||
{
|
||||
window->SizeChanged +=
|
||||
ref new TypedEventHandler<CoreWindow^, WindowSizeChangedEventArgs^>(this, &App::OnWindowSizeChanged);
|
||||
|
||||
window->VisibilityChanged +=
|
||||
ref new TypedEventHandler<CoreWindow^, VisibilityChangedEventArgs^>(this, &App::OnVisibilityChanged);
|
||||
|
||||
window->Activated +=
|
||||
ref new TypedEventHandler<CoreWindow^, WindowActivatedEventArgs^>(this, &App::OnWindowActivated);
|
||||
|
||||
window->Closed +=
|
||||
ref new TypedEventHandler<CoreWindow^, CoreWindowEventArgs^>(this, &App::OnWindowClosed);
|
||||
|
||||
window->KeyDown +=
|
||||
ref new TypedEventHandler<CoreWindow^, KeyEventArgs^>(this, &App::OnKeyDown);
|
||||
|
||||
window->KeyUp +=
|
||||
ref new TypedEventHandler<CoreWindow^, KeyEventArgs^>(this, &App::OnKeyUp);
|
||||
|
||||
DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView();
|
||||
|
||||
currentDisplayInformation->DpiChanged +=
|
||||
ref new TypedEventHandler<DisplayInformation^, Object^>(this, &App::OnDpiChanged);
|
||||
|
||||
currentDisplayInformation->OrientationChanged +=
|
||||
ref new TypedEventHandler<DisplayInformation^, Object^>(this, &App::OnOrientationChanged);
|
||||
|
||||
DisplayInformation::DisplayContentsInvalidated +=
|
||||
ref new TypedEventHandler<DisplayInformation^, Object^>(this, &App::OnDisplayContentsInvalidated);
|
||||
|
||||
Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->BackRequested +=
|
||||
ref new EventHandler<Windows::UI::Core::BackRequestedEventArgs^>(this, &App::OnBackRequested);
|
||||
}
|
||||
|
||||
// Initializes scene resources, or loads a previously saved app state.
|
||||
void App::Load(Platform::String^ entryPoint)
|
||||
{
|
||||
int ret = rarch_main(NULL, NULL, NULL);
|
||||
if (ret != 0)
|
||||
{
|
||||
RARCH_ERR("Init failed\n");
|
||||
CoreApplication::Exit();
|
||||
return;
|
||||
}
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_uwp); // TODO (krzys_h): move this to the input driver
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
// This method is called after the window becomes active.
|
||||
void App::Run()
|
||||
{
|
||||
if (!m_initialized)
|
||||
{
|
||||
RARCH_WARN("Initialization failed, so not running\n");
|
||||
return;
|
||||
}
|
||||
|
||||
bool x = false;
|
||||
while (true)
|
||||
{
|
||||
CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent);
|
||||
|
||||
unsigned sleep_ms = 0;
|
||||
int ret = runloop_iterate(&sleep_ms);
|
||||
|
||||
if (ret == 1 && sleep_ms > 0)
|
||||
retro_sleep(sleep_ms);
|
||||
|
||||
task_queue_check();
|
||||
|
||||
if (!x)
|
||||
{
|
||||
/* HACK: I have no idea why is this necessary but it is required to get proper scaling on Xbox *
|
||||
* Perhaps PreferredLaunchViewSize is broken and we need to wait until the app starts to call TryResizeView */
|
||||
m_windowResized = true;
|
||||
x = true;
|
||||
}
|
||||
|
||||
if (ret == -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Required for IFrameworkView.
|
||||
// Terminate events do not cause Uninitialize to be called. It will be called if your IFrameworkView
|
||||
// class is torn down while the app is in the foreground.
|
||||
void App::Uninitialize()
|
||||
{
|
||||
main_exit(NULL);
|
||||
}
|
||||
|
||||
// Application lifecycle event handlers.
|
||||
|
||||
void App::OnActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ args)
|
||||
{
|
||||
// Run() won't start until the CoreWindow is activated.
|
||||
CoreWindow::GetForCurrentThread()->Activate();
|
||||
}
|
||||
|
||||
void App::OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ args)
|
||||
{
|
||||
// Save app state asynchronously after requesting a deferral. Holding a deferral
|
||||
// indicates that the application is busy performing suspending operations. Be
|
||||
// aware that a deferral may not be held indefinitely. After about five seconds,
|
||||
// the app will be forced to exit.
|
||||
SuspendingDeferral^ deferral = args->SuspendingOperation->GetDeferral();
|
||||
|
||||
create_task([this, deferral]()
|
||||
{
|
||||
// TODO: Maybe creating a save state here would be a good idea?
|
||||
|
||||
deferral->Complete();
|
||||
});
|
||||
}
|
||||
|
||||
void App::OnResuming(Platform::Object^ sender, Platform::Object^ args)
|
||||
{
|
||||
// Restore any data or state that was unloaded on suspend. By default, data
|
||||
// and state are persisted when resuming from suspend. Note that this event
|
||||
// does not occur if the app was previously terminated.
|
||||
}
|
||||
|
||||
void App::OnBackRequested(Platform::Object^ sender, Windows::UI::Core::BackRequestedEventArgs^ args)
|
||||
{
|
||||
/* Prevent the B controller button on Xbox One from quitting the app */
|
||||
args->Handled = true;
|
||||
}
|
||||
|
||||
// Window event handlers.
|
||||
|
||||
void App::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEventArgs^ args)
|
||||
{
|
||||
m_windowResized = true;
|
||||
}
|
||||
|
||||
void App::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEventArgs^ args)
|
||||
{
|
||||
m_windowVisible = args->Visible;
|
||||
}
|
||||
|
||||
void App::OnWindowActivated(CoreWindow^ sender, WindowActivatedEventArgs^ args)
|
||||
{
|
||||
m_windowFocused = args->WindowActivationState != CoreWindowActivationState::Deactivated;
|
||||
}
|
||||
|
||||
void App::OnKeyDown(CoreWindow^ sender, KeyEventArgs^ args)
|
||||
{
|
||||
OnKey(sender, args, true);
|
||||
}
|
||||
|
||||
void App::OnKeyUp(CoreWindow^ sender, KeyEventArgs^ args)
|
||||
{
|
||||
OnKey(sender, args, false);
|
||||
}
|
||||
|
||||
void App::OnKey(CoreWindow^ sender, KeyEventArgs^ args, bool down)
|
||||
{
|
||||
uint16_t mod = 0;
|
||||
if ((sender->GetKeyState(VirtualKey::Shift) & CoreVirtualKeyStates::Locked) == CoreVirtualKeyStates::Locked)
|
||||
mod |= RETROKMOD_SHIFT;
|
||||
if ((sender->GetKeyState(VirtualKey::Control) & CoreVirtualKeyStates::Locked) == CoreVirtualKeyStates::Locked)
|
||||
mod |= RETROKMOD_CTRL;
|
||||
if ((sender->GetKeyState(VirtualKey::Menu) & CoreVirtualKeyStates::Locked) == CoreVirtualKeyStates::Locked)
|
||||
mod |= RETROKMOD_ALT;
|
||||
if ((sender->GetKeyState(VirtualKey::CapitalLock) & CoreVirtualKeyStates::Locked) == CoreVirtualKeyStates::Locked)
|
||||
mod |= RETROKMOD_CAPSLOCK;
|
||||
if ((sender->GetKeyState(VirtualKey::Scroll) & CoreVirtualKeyStates::Locked) == CoreVirtualKeyStates::Locked)
|
||||
mod |= RETROKMOD_SCROLLOCK;
|
||||
if ((sender->GetKeyState(VirtualKey::LeftWindows) & CoreVirtualKeyStates::Locked) == CoreVirtualKeyStates::Locked ||
|
||||
(sender->GetKeyState(VirtualKey::RightWindows) & CoreVirtualKeyStates::Locked) == CoreVirtualKeyStates::Locked)
|
||||
mod |= RETROKMOD_META;
|
||||
|
||||
unsigned keycode = input_keymaps_translate_keysym_to_rk((unsigned)args->VirtualKey);
|
||||
|
||||
input_keyboard_event(down, keycode, 0, mod, RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
|
||||
void App::OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args)
|
||||
{
|
||||
m_windowClosed = true;
|
||||
}
|
||||
|
||||
// DisplayInformation event handlers.
|
||||
|
||||
void App::OnDpiChanged(DisplayInformation^ sender, Object^ args)
|
||||
{
|
||||
m_windowResized = true;
|
||||
}
|
||||
|
||||
void App::OnOrientationChanged(DisplayInformation^ sender, Object^ args)
|
||||
{
|
||||
m_windowResized = true;
|
||||
}
|
||||
|
||||
void App::OnDisplayContentsInvalidated(DisplayInformation^ sender, Object^ args)
|
||||
{
|
||||
// Probably can be ignored?
|
||||
}
|
||||
|
||||
// Taken from DirectX UWP samples - on Xbox, everything is scaled 200% so getting the DPI calculation correct is crucial
|
||||
static inline float ConvertDipsToPixels(float dips, float dpi)
|
||||
{
|
||||
static const float dipsPerInch = 96.0f;
|
||||
return floorf(dips * dpi / dipsPerInch + 0.5f);
|
||||
}
|
||||
|
||||
// Implement UWP equivalents of various win32_* functions
|
||||
extern "C" {
|
||||
|
||||
bool win32_has_focus(void)
|
||||
{
|
||||
return App::GetInstance()->IsWindowFocused();
|
||||
}
|
||||
|
||||
bool win32_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen)
|
||||
{
|
||||
if (App::GetInstance()->IsInitialized())
|
||||
{
|
||||
if (fullscreen != ApplicationView::GetForCurrentView()->IsFullScreenMode)
|
||||
{
|
||||
if (fullscreen)
|
||||
ApplicationView::GetForCurrentView()->TryEnterFullScreenMode();
|
||||
else
|
||||
ApplicationView::GetForCurrentView()->ExitFullScreenMode();
|
||||
}
|
||||
ApplicationView::GetForCurrentView()->TryResizeView(Size(width, height));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* In case the window is not activated yet, TryResizeView will fail and we have to set the initial parameters instead */
|
||||
/* Note that these are preserved after restarting the app and used for the UWP splash screen size (!), so they should be set only during init and not changed afterwards */
|
||||
ApplicationView::PreferredLaunchViewSize = Size(width, height);
|
||||
ApplicationView::PreferredLaunchWindowingMode = fullscreen ? ApplicationViewWindowingMode::FullScreen : ApplicationViewWindowingMode::PreferredLaunchViewSize;
|
||||
}
|
||||
|
||||
/* Setting the window size may sometimes fail "because UWP"
|
||||
* (i.e. we are on device with no windows, or Windows sandbox decides the window can't be that small)
|
||||
* so in case resizing fails we just send a resized event back to RetroArch with old size
|
||||
* (and report success because otherwise it bails out hard about failing to set video mode)
|
||||
*/
|
||||
App::GetInstance()->SetWindowResized();
|
||||
return true;
|
||||
}
|
||||
|
||||
void win32_show_cursor(bool state)
|
||||
{
|
||||
CoreWindow::GetForCurrentThread()->PointerCursor = state ? ref new CoreCursor(CoreCursorType::Arrow, 0) : nullptr;
|
||||
}
|
||||
|
||||
void win32_check_window(bool *quit, bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
*quit = App::GetInstance()->IsWindowClosed();
|
||||
*resize = App::GetInstance()->CheckWindowResized();
|
||||
if (*resize)
|
||||
{
|
||||
float dpi = DisplayInformation::GetForCurrentView()->LogicalDpi;
|
||||
*width = ConvertDipsToPixels(CoreWindow::GetForCurrentThread()->Bounds.Width, dpi);
|
||||
*height = ConvertDipsToPixels(CoreWindow::GetForCurrentThread()->Bounds.Height, dpi);
|
||||
}
|
||||
}
|
||||
|
||||
void* uwp_get_corewindow(void)
|
||||
{
|
||||
return (void*)CoreWindow::GetForCurrentThread();
|
||||
}
|
||||
}
|
82
uwp/uwp_main.h
Normal file
@ -0,0 +1,82 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2018 - Krzysztof Haładyn
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "uwp_main.h"
|
||||
|
||||
namespace RetroArchUWP
|
||||
{
|
||||
// Main entry point for our app. Connects the app with the Windows shell and handles application lifecycle events.
|
||||
ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView
|
||||
{
|
||||
public:
|
||||
App();
|
||||
|
||||
// IFrameworkView methods.
|
||||
virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
|
||||
virtual void SetWindow(Windows::UI::Core::CoreWindow^ window);
|
||||
virtual void Load(Platform::String^ entryPoint);
|
||||
virtual void Run();
|
||||
virtual void Uninitialize();
|
||||
|
||||
protected:
|
||||
// Application lifecycle event handlers.
|
||||
void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args);
|
||||
void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args);
|
||||
void OnResuming(Platform::Object^ sender, Platform::Object^ args);
|
||||
|
||||
void OnBackRequested(Platform::Object^ sender, Windows::UI::Core::BackRequestedEventArgs^ args);
|
||||
|
||||
// Window event handlers.
|
||||
void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args);
|
||||
void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args);
|
||||
void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args);
|
||||
void OnWindowActivated(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowActivatedEventArgs^ args);
|
||||
void OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args);
|
||||
void OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args);
|
||||
|
||||
// DisplayInformation event handlers.
|
||||
void OnDpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
|
||||
void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
|
||||
void OnDisplayContentsInvalidated(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
|
||||
|
||||
public:
|
||||
bool IsInitialized() { return m_initialized; }
|
||||
bool IsWindowClosed() { return m_windowClosed; }
|
||||
bool IsWindowVisible() { return m_windowVisible; }
|
||||
bool IsWindowFocused() { return m_windowFocused; }
|
||||
bool CheckWindowResized() { bool resized = m_windowResized; m_windowResized = false; return resized; }
|
||||
void SetWindowResized() { m_windowResized = true; }
|
||||
static App^ GetInstance() { return m_instance; }
|
||||
|
||||
private:
|
||||
void OnKey(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args, bool down);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
bool m_windowClosed;
|
||||
bool m_windowVisible;
|
||||
bool m_windowFocused;
|
||||
bool m_windowResized;
|
||||
static App^ m_instance;
|
||||
};
|
||||
}
|
||||
|
||||
ref class Direct3DApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
|
||||
{
|
||||
public:
|
||||
virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView();
|
||||
};
|
19
verbosity.c
@ -37,6 +37,11 @@
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
#if _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <string/stdstring.h>
|
||||
#include <streams/file_stream.h>
|
||||
#include <compat/fopen_utf8.h>
|
||||
@ -60,7 +65,11 @@
|
||||
* will write to this file. */
|
||||
static FILE *log_file_fp = NULL;
|
||||
static void* log_file_buf = NULL;
|
||||
#if _DEBUG
|
||||
static bool main_verbosity = true;
|
||||
#else
|
||||
static bool main_verbosity = false;
|
||||
#endif
|
||||
static bool log_file_initialized = false;
|
||||
|
||||
#ifdef NXLINK
|
||||
@ -193,7 +202,7 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
|
||||
#else
|
||||
|
||||
{
|
||||
#ifdef HAVE_QT
|
||||
#if defined(HAVE_QT) || defined(__WINRT__)
|
||||
char buffer[1024];
|
||||
#endif
|
||||
#ifdef HAVE_FILE_LOGGER
|
||||
@ -202,7 +211,7 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
|
||||
FILE *fp = stderr;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_QT
|
||||
#if defined(HAVE_QT) || defined(__WINRT__)
|
||||
buffer[0] = '\0';
|
||||
vsnprintf(buffer, sizeof(buffer), fmt, ap);
|
||||
|
||||
@ -212,7 +221,13 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
|
||||
fflush(fp);
|
||||
}
|
||||
|
||||
#if defined(HAVE_QT)
|
||||
ui_companion_driver_log_msg(buffer);
|
||||
#endif
|
||||
|
||||
#if defined(__WINRT__)
|
||||
OutputDebugStringA(buffer);
|
||||
#endif
|
||||
#else
|
||||
#if defined(NXLINK) && !defined(HAVE_FILE_LOGGER)
|
||||
if (nxlink_connected)
|
||||
|