Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Arzed Five 2016-06-08 17:07:18 +01:00
commit 4d529ffbc0
80 changed files with 1297 additions and 350 deletions

View File

@ -18,6 +18,10 @@ ifeq ($(HAVE_LIBRETRODB),)
HAVE_LIBRETRODB = 1
endif
ifeq ($(HAVE_HID), 1)
DEFINES += -DHAVE_HID
endif
ifeq ($(HAVE_LIBRETRODB), 1)
DEFINES += -DHAVE_LIBRETRODB
endif
@ -113,19 +117,14 @@ OBJ += frontend/frontend.o \
ui/ui_companion_driver.o \
ui/drivers/ui_null.o \
ui/drivers/null/ui_null_window.o \
ui/drivers/null/ui_null_browser_window.o \
ui/drivers/null/ui_null_msg_window.o \
ui/drivers/null/ui_null_application.o \
core_impl.o \
retroarch.o \
input/input_keyboard.o \
command.o \
msg_hash.o \
intl/msg_hash_de.o \
intl/msg_hash_eo.o \
intl/msg_hash_es.o \
intl/msg_hash_fr.o \
intl/msg_hash_it.o \
intl/msg_hash_nl.o \
intl/msg_hash_pl.o \
intl/msg_hash_pt.o \
intl/msg_hash_us.o \
runloop.o \
libretro-common/algorithms/mismatch.o \
@ -154,7 +153,6 @@ OBJ += frontend/frontend.o \
libretro-common/hash/rhash.o \
audio/audio_driver.o \
input/input_driver.o \
input/input_hid_driver.o \
gfx/video_coord_array.o \
gfx/video_driver.o \
camera/camera_driver.o \
@ -206,7 +204,6 @@ OBJ += frontend/frontend.o \
input/drivers/nullinput.o \
input/drivers_hid/null_hid.o \
input/drivers_joypad/null_joypad.o \
input/drivers_joypad/hid_joypad.o \
playlist.o \
movie.o \
record/record_driver.o \
@ -215,6 +212,19 @@ OBJ += frontend/frontend.o \
performance_counters.o \
verbosity.o
ifeq ($(HAVE_LANGEXTRA), 1)
DEFINES += -DHAVE_LANGEXTRA
OBJ += intl/msg_hash_de.o \
intl/msg_hash_eo.o \
intl/msg_hash_es.o \
intl/msg_hash_fr.o \
intl/msg_hash_it.o \
intl/msg_hash_nl.o \
intl/msg_hash_pl.o \
intl/msg_hash_pt.o
endif
ifneq ($(HAVE_GETOPT_LONG), 1)
OBJ += libretro-common/compat/compat_getopt.o
endif
@ -461,17 +471,20 @@ ifeq ($(HAVE_MENU_COMMON), 1)
else
PSEUDO_NS :=
endif
OBJ += menu/menu_hash.o \
menu/menu_driver.o \
menu/menu_content.o \
menu/intl/menu_hash_de.o \
ifeq ($(HAVE_LANGEXTRA), 1)
OBJ += menu/intl/menu_hash_de.o \
menu/intl/menu_hash_es.o \
menu/intl/menu_hash_eo.o \
menu/intl/menu_hash_fr.o \
menu/intl/menu_hash_it.o \
menu/intl/menu_hash_nl.o \
menu/intl/menu_hash_pl.o \
menu/intl/menu_hash_pt.o \
menu/intl/menu_hash_pt.o
endif
OBJ += menu/menu_hash.o \
menu/menu_driver.o \
menu/menu_content.o \
menu/intl/menu_hash_us$(PSEUDO_NS).o \
menu/menu_input.o \
menu/menu_entry.o \
@ -595,19 +608,21 @@ endif
ifeq ($(HAVE_LIBUSB), 1)
ifeq ($(HAVE_THREADS), 1)
ifeq ($(HAVE_HID), 1)
DEFINES += -DHAVE_LIBUSB
OBJ += input/drivers_hid/libusb_hid.o
LIBS += -lusb-1.0
HAVE_HID = 1
endif
endif
endif
ifeq ($(HAVE_IOHIDMANAGER), 1)
ifeq ($(HAVE_HID), 1)
DEFINES += -DHAVE_IOHIDMANAGER
OBJ += input/drivers_hid/iohidmanager_hid.o
HAVE_HID = 1
LIBS += -framework IOKit
endif
endif
ifeq ($(HAVE_CORELOCATION), 1)
DEFINES += -DHAVE_CORELOCATION
@ -616,7 +631,9 @@ endif
ifeq ($(HAVE_HID), 1)
DEFINES += -DHAVE_HID
OBJ += input/connect/joypad_connection.o \
OBJ += input/input_hid_driver.o \
input/drivers_joypad/hid_joypad.o \
input/connect/joypad_connection.o \
input/connect/connect_ps2adapter.o \
input/connect/connect_ps3.o \
input/connect/connect_ps4.o \
@ -635,7 +652,10 @@ endif
ifneq ($(findstring Win32,$(OS)),)
OBJ += ui/drivers/ui_win32.o \
ui/drivers/win32/ui_win32_window.o
ui/drivers/win32/ui_win32_window.o \
ui/drivers/win32/ui_win32_browser_window.o \
ui/drivers/win32/ui_win32_msg_window.o \
ui/drivers/win32/ui_win32_application.o
endif
# Video
@ -1010,7 +1030,7 @@ ifeq ($(HAVE_NETWORKING), 1)
# Netplay
ifeq ($(HAVE_NETPLAY), 1)
DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD -DHAVE_NETWORK_GAMEPAD
DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD
OBJ += network/netplay/netplay_net.o \
network/netplay/netplay_spectate.o \
network/netplay/netplay_common.o \
@ -1026,7 +1046,7 @@ ifeq ($(HAVE_NETWORKING), 1)
endif
endif
ifeq ($(HAVE_NETWORK_GAMEPAD), 1)
ifeq ($(HAVE_NETWORKGAMEPAD), 1)
OBJ += input/input_remote.o \
cores/libretro-net-retropad/net_retropad_core.o
endif
@ -1072,6 +1092,9 @@ ifeq ($(HAVE_COCOA),1)
input/drivers_keyboard/keyboard_event_apple.o \
ui/drivers/ui_cocoa.o \
ui/drivers/cocoa/ui_cocoa_window.o \
ui/drivers/cocoa/ui_cocoa_browser_window.o \
ui/drivers/cocoa/ui_cocoa_msg_window.o \
ui/drivers/cocoa/ui_cocoa_application.o \
ui/drivers/cocoa/cocoa_common.o \
gfx/drivers_context/cocoa_gl_ctx.o
endif

View File

@ -137,6 +137,7 @@ endif
RARCH_CONSOLE = 1
ifeq ($(platform), wii)
HAVE_LANGEXTRA := 1
HAVE_WIIUSB_HID := 1
HAVE_RARCH_EXEC := 1
HAVE_RSOUND := 1
@ -192,6 +193,7 @@ else ifeq ($(platform), psp1)
HAVE_RBMP := 1
HAVE_RTGA := 1
HAVE_KERNEL_PRX := 1
HAVE_LANGEXTRA := 1
RARCH_CONSOLE = 1
ifeq ($(BUILD_PRX), 1)
@ -220,6 +222,7 @@ else ifeq ($(platform), vita)
HAVE_FILTERS_BUILTIN := 1
HAVE_BUILTIN_AUTOCONFIG := 1
HAVE_LANGEXTRA := 1
HAVE_RPNG := 1
HAVE_RJPEG := 1
HAVE_RBMP := 1
@ -330,6 +333,10 @@ endif
CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL
ifeq ($(HAVE_LANGEXTRA), 1)
CFLAGS += -DHAVE_LANGEXTRA
endif
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
CFLAGS += -DHAVE_FILTERS_BUILTIN
endif

View File

@ -106,7 +106,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_BUILTIN_AUTOCONFIG
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_BUILTIN_AUTOCONFIG
ifeq ($(DEBUG), 1)
PPU_OPTIMIZE_LV := -O0 -g

View File

@ -23,7 +23,7 @@ INCDIR = deps/zlib deps/7zip libretro-common/include
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math
ASFLAGS = $(CFLAGS)
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DSINC_LOWEST_QUALITY -DHAVE_BUILTIN_AUTOCONFIG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DSINC_LOWEST_QUALITY -DHAVE_BUILTIN_AUTOCONFIG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP
LIBDIR =
LDFLAGS =

View File

@ -32,7 +32,7 @@ static const bool _network_command_supp = true;
static const bool _network_command_supp = false;
#endif
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
static const bool _network_gamepad_supp = true;
#else
static const bool _network_gamepad_supp = false;

View File

@ -777,7 +777,9 @@ static void config_set_defaults(void)
settings->menu_scroll_down_btn = default_menu_btn_scroll_down;
settings->menu_scroll_up_btn = default_menu_btn_scroll_up;
#ifdef HAVE_LANGEXTRA
settings->user_language = 0;
#endif
global->console.sound.system_bgm_enable = false;
@ -1739,7 +1741,7 @@ static bool config_load_file(const char *path, bool set_defaults)
settings->bluetooth_enable = path_file_exists(LAKKA_BLUETOOTH_PATH);
#endif
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
CONFIG_GET_BOOL_BASE(conf, settings, network_remote_enable, "network_remote_enable");
for (i = 0; i < MAX_USERS; i++)
{
@ -1773,7 +1775,9 @@ static bool config_load_file(const char *path, bool set_defaults)
if (!rarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL))
config_get_path(conf, "netplay_nickname", settings->username, sizeof(settings->username));
#ifdef HAVE_LANGEXTRA
CONFIG_GET_INT_BASE(conf, settings, user_language, "user_language");
#endif
#ifdef HAVE_NETPLAY
if (!global->has_set.netplay_mode)
CONFIG_GET_BOOL_BASE(conf, global, netplay.is_spectate,
@ -2895,7 +2899,9 @@ bool config_save_file(const char *path)
config_set_int(conf, "netplay_delay_frames", global->netplay.sync_frames);
#endif
config_set_string(conf, "netplay_nickname", settings->username);
#ifdef HAVE_LANGEXTRA
config_set_int(conf, "user_language", settings->user_language);
#endif
config_set_bool(conf, "custom_bgm_enable",
global->console.sound.system_bgm_enable);
@ -2919,7 +2925,7 @@ bool config_save_file(const char *path)
config_set_int(conf, cfg, settings->input.analog_dpad_mode[i]);
}
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
for (i = 0; i < MAX_USERS; i++)
{
char tmp[64] = {0};

View File

@ -404,7 +404,9 @@ typedef struct settings
unsigned menu_scroll_up_btn;
char username[32];
#ifdef HAVE_LANGEXTRA
unsigned int user_language;
#endif
bool config_save_on_exit;

View File

@ -184,7 +184,7 @@ size_t libretro_imageviewer_retro_get_memory_size(unsigned id);
#endif
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
/* Internal networked retropad core. */
void libretro_netretropad_retro_init(void);

View File

@ -77,7 +77,7 @@ static dylib_t lib_handle;
#define SYMBOL_IMAGEVIEWER(x) current_core->x = libretro_imageviewer_##x
#endif
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
#define SYMBOL_NETRETROPAD(x) current_core->x = libretro_netretropad_##x
#endif
@ -507,7 +507,7 @@ static void load_symbols(enum rarch_core_type type, struct retro_core_t *current
#endif
break;
case CORE_TYPE_NETRETROPAD:
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
SYMBOL_NETRETROPAD(retro_init);
SYMBOL_NETRETROPAD(retro_deinit);
@ -901,9 +901,11 @@ bool rarch_environment_cb(unsigned cmd, void *data)
break;
case RETRO_ENVIRONMENT_GET_LANGUAGE:
#ifdef HAVE_LANGEXTRA
*(unsigned *)data = settings->user_language;
RARCH_LOG("Environ GET_LANGUAGE: \"%u\".\n",
settings->user_language);
#endif
break;
case RETRO_ENVIRONMENT_SET_PIXEL_FORMAT:

View File

@ -223,6 +223,7 @@ typedef struct vulkan_context_fp
PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties;
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetSurfacePresentModesKHR;
PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR;
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR;

View File

@ -1054,6 +1054,7 @@ static bool vulkan_load_instance_symbols(gfx_ctx_vulkan_data_t *vk)
VK_GET_INSTANCE_PROC_ADDR(GetPhysicalDeviceQueueFamilyProperties);
VK_GET_INSTANCE_PROC_ADDR(CreateDevice);
VK_GET_INSTANCE_PROC_ADDR(GetPhysicalDeviceSurfacePresentModesKHR);
VK_GET_INSTANCE_PROC_ADDR(GetPhysicalDeviceSurfaceSupportKHR);
VK_GET_INSTANCE_PROC_ADDR(GetPhysicalDeviceSurfaceCapabilitiesKHR);
VK_GET_INSTANCE_PROC_ADDR(GetPhysicalDeviceSurfaceFormatsKHR);
@ -1504,7 +1505,12 @@ bool vulkan_surface_create(gfx_ctx_vulkan_data_t *vk,
if (VKFUNC(vkCreateAndroidSurfaceKHR)(vk->context.instance,
&surf_info, NULL, &vk->vk_surface) != VK_SUCCESS)
{
RARCH_ERR("[Vulkan]: Failed to create Android surface.\n");
return false;
}
RARCH_LOG("[Vulkan]: Created Android surface: %llu\n",
(unsigned long long)vk->vk_surface);
}
#endif
break;
@ -1725,18 +1731,50 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk,
{
unsigned i;
uint32_t format_count;
uint32_t present_mode_count;
uint32_t desired_swapchain_images;
VkSwapchainCreateInfoKHR info;
VkSurfaceCapabilitiesKHR surface_properties;
VkSurfaceFormatKHR formats[256];
VkPresentModeKHR present_modes[16];
VkSurfaceFormatKHR format;
VkExtent2D swapchain_size;
VkSwapchainKHR old_swapchain;
VkSurfaceTransformFlagBitsKHR pre_transform;
VkPresentModeKHR swapchain_present_mode = VK_PRESENT_MODE_FIFO_KHR;
/* TODO: Properly query these. */
VkPresentModeKHR swapchain_present_mode = swap_interval
? VK_PRESENT_MODE_FIFO_KHR : VK_PRESENT_MODE_MAILBOX_KHR;
present_mode_count = 0;
VKFUNC(vkGetPhysicalDeviceSurfacePresentModesKHR)(
vk->context.gpu, vk->vk_surface,
&present_mode_count, NULL);
if (present_mode_count < 1 || present_mode_count > 16)
{
RARCH_ERR("[Vulkan]: Bogus present modes found.\n");
return false;
}
VKFUNC(vkGetPhysicalDeviceSurfacePresentModesKHR)(
vk->context.gpu, vk->vk_surface,
&present_mode_count, present_modes);
for (i = 0; i < present_mode_count; i++)
{
if (!swap_interval && present_modes[i] == VK_PRESENT_MODE_MAILBOX_KHR)
{
swapchain_present_mode = VK_PRESENT_MODE_MAILBOX_KHR;
break;
}
else if (!swap_interval && present_modes[i] == VK_PRESENT_MODE_IMMEDIATE_KHR)
{
swapchain_present_mode = VK_PRESENT_MODE_IMMEDIATE_KHR;
break;
}
else if (swap_interval && present_modes[i] == VK_PRESENT_MODE_FIFO_KHR)
{
/* Kind of tautological since FIFO must always be present. */
swapchain_present_mode = VK_PRESENT_MODE_FIFO_KHR;
break;
}
}
RARCH_LOG("[Vulkan]: Creating swapchain with present mode: %u\n",
(unsigned)swapchain_present_mode);
@ -1772,6 +1810,9 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk,
else
swapchain_size = surface_properties.currentExtent;
RARCH_LOG("[Vulkan]: Using swapchain size %u x %u.\n",
swapchain_size.width, swapchain_size.height);
desired_swapchain_images = surface_properties.minImageCount + 1;
/* Limit latency. */
@ -1793,6 +1834,7 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk,
old_swapchain = vk->swapchain;
memset(&info, 0, sizeof(info));
info.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
info.surface = vk->vk_surface;
info.minImageCount = desired_swapchain_images;

View File

@ -537,13 +537,9 @@ void win32_show_cursor(bool state)
void win32_check_window(bool *quit, bool *resize, unsigned *width, unsigned *height)
{
#ifndef _XBOX
MSG msg;
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
const ui_application_t *application = ui_companion_driver_get_application_ptr();
if (application)
application->process_events();
#endif
*quit = g_quit;

View File

@ -35,7 +35,7 @@
#ifndef _XBOX
#include "../../ui/drivers/ui_win32_resource.h"
#include "../../ui/drivers/win32/ui_win32_window.h"
#include "../../ui/drivers/ui_win32.h"
extern unsigned g_resize_width;
extern unsigned g_resize_height;

View File

@ -1,6 +1,6 @@
#include "shaders_common.h"
static const char *stock_cg_gl_program = GLSL(
static const char *stock_cg_gl_program = CG(
struct input
{
float2 tex_coord;

View File

@ -1,6 +1,6 @@
#include "shaders_common.h"
static const char *nuklear_shader = GLSL(
static const char *nuklear_shader = CG(
struct input
{
float time;

View File

@ -1,6 +1,6 @@
#include "shaders_common.h"
static const char *nuklear_fragment_shader = GLSL_330(
static const char *nuklear_fragment_shader = GLSL_300(
precision mediump float;
uniform sampler2D Texture;
in vec2 Frag_UV;

View File

@ -1,6 +1,6 @@
#include "shaders_common.h"
static const char *nuklear_vertex_shader = GLSL_330(
static const char *nuklear_vertex_shader = GLSL_300(
uniform mat4 ProjMtx;
in vec2 Position;
in vec2 TexCoord;

View File

@ -1,6 +1,6 @@
#include "shaders_common.h"
static const char *stock_xmb_simple = GLSL(
static const char *stock_xmb_simple = CG(
struct input
{
float time;

View File

@ -2,10 +2,13 @@
#define _SHADERS_COMMON
#if defined(HAVE_OPENGLES)
#define CG(src) "" #src
#define GLSL(src) "precision mediump float;\n" #src
#define GLSL_330(src) "#version 330 es\nprecision mediump float;\n" #src
#else
#define CG(src) "" #src
#define GLSL(src) "" #src
#define GLSL_300(src) "#version 300 es\n" #src
#define GLSL_330(src) "#version 330 core\n" #src
#endif

View File

@ -152,12 +152,12 @@ static void *android_gfx_ctx_init(void *video_driver)
if (!android_app->window)
goto unlock_error;
ANativeWindow_setBuffersGeometry(android_app->window, 0, 0, format);
switch (android_api)
{
case GFX_CTX_OPENGL_API:
case GFX_CTX_OPENGL_ES_API:
ANativeWindow_setBuffersGeometry(android_app->window, 0, 0, format);
#ifdef HAVE_EGL
if (!egl_create_context(&and->egl, context_attributes))
{

View File

@ -89,7 +89,7 @@ static bool g_is_syncing = true;
static bool g_use_hw_ctx;
#if defined(HAVE_COCOA)
#include "../../ui/drivers/cocoa/ui_cocoa_window.h"
#include "../../ui/drivers/ui_cocoa.h"
static NSOpenGLPixelFormat* g_format;
void *glcontext_get_ptr(void)
@ -163,7 +163,7 @@ void *get_chosen_screen(void)
if (settings->video.monitor_index >= screens.count)
{
RARCH_WARN("video_monitor_index is greater than the number of connected monitors; using main screen instead.\n");
RARCH_WARN("video_monitor_index is greater than the number of connected monitors; using main screen instead.");
#if __has_feature(objc_arc)
return (__bridge void*)screens;
#else

View File

@ -246,8 +246,8 @@ VIDEO IMAGE
#endif
#ifdef HAVE_RBMP
#include "../libretro-common/formats/bmp/rbmp.c"
#endif
#include "../libretro-common/formats/bmp/rbmp_encode.c"
#endif
/*============================================================
VIDEO DRIVER
@ -356,7 +356,6 @@ INPUT
============================================================ */
#include "../input/input_autodetect.c"
#include "../input/input_joypad_driver.c"
#include "../input/input_hid_driver.c"
#include "../input/input_config.c"
#include "../input/input_keymaps.c"
#include "../input/input_remapping.c"
@ -440,8 +439,9 @@ INPUT
/*============================================================
INPUT (HID)
============================================================ */
#ifdef HAVE_HID
#include "../input/input_hid_driver.c"
#include "../input/drivers_joypad/hid_joypad.c"
#include "../input/drivers_hid/null_hid.c"
#if defined(HAVE_LIBUSB) && defined(HAVE_THREADS)
@ -460,7 +460,6 @@ INPUT (HID)
#include "../input/drivers_hid/wiiusb_hid.c"
#endif
#ifdef HAVE_HID
#include "../input/connect/joypad_connection.c"
#include "../input/connect/connect_ps3.c"
#include "../input/connect/connect_ps4.c"
@ -724,6 +723,9 @@ UI
#include "../ui/drivers/ui_null.c"
#include "../ui/drivers/null/ui_null_window.c"
#include "../ui/drivers/null/ui_null_browser_window.c"
#include "../ui/drivers/null/ui_null_msg_window.c"
#include "../ui/drivers/null/ui_null_application.c"
#ifdef HAVE_QT
#include "../ui/drivers/ui_qt.c"
@ -731,7 +733,9 @@ UI
#if defined(_WIN32) && !defined(_XBOX)
#include "../ui/drivers/ui_win32.c"
#include "../ui/drivers/win32/ui_win32_window.c"
#include "../ui/drivers/win32/ui_win32_browser_window.c"
#include "../ui/drivers/win32/ui_win32_msg_window.c"
#include "../ui/drivers/win32/ui_win32_application.c"
#endif
/*============================================================
@ -758,6 +762,7 @@ RETROARCH
#include "../tasks/tasks_internal.c"
#include "../msg_hash.c"
#ifdef HAVE_LANGEXTRA
#include "../intl/msg_hash_de.c"
#include "../intl/msg_hash_es.c"
#include "../intl/msg_hash_eo.c"
@ -766,10 +771,12 @@ RETROARCH
#include "../intl/msg_hash_nl.c"
#include "../intl/msg_hash_pt.c"
#include "../intl/msg_hash_pl.c"
#include "../intl/msg_hash_us.c"
#ifdef HAVE_UTF8
#include "../intl/msg_hash_ru.c"
#endif
#endif
#include "../intl/msg_hash_us.c"
/*============================================================
RECORDING
@ -871,6 +878,7 @@ MENU
#include "../menu/menu_displaylist.c"
#include "../menu/menu_animation.c"
#ifdef HAVE_LANGEXTRA
#include "../menu/intl/menu_hash_de.c"
#include "../menu/intl/menu_hash_es.c"
#include "../menu/intl/menu_hash_eo.c"
@ -879,10 +887,11 @@ MENU
#include "../menu/intl/menu_hash_nl.c"
#include "../menu/intl/menu_hash_pl.c"
#include "../menu/intl/menu_hash_pt.c"
#include "../menu/intl/menu_hash_us.c"
#ifdef HAVE_UTF8
#include "../menu/intl/menu_hash_ru.c"
#endif
#endif
#include "../menu/intl/menu_hash_us.c"
#include "../menu/drivers/null.c"
#include "../menu/drivers/menu_generic.c"
@ -930,7 +939,7 @@ MENU
#endif
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
#include "../input/input_remote.c"
#include "../cores/libretro-net-retropad/net_retropad_core.c"
#endif

View File

@ -120,6 +120,14 @@ VIDEO CONTEXT
#include "../gfx/drivers_context/d3d_ctx.cpp"
#endif
/*============================================================
UI
============================================================ */
#if defined(_WIN32) && !defined(_XBOX)
#include "../ui/drivers/win32/ui_win32_window.cpp"
#endif
/*============================================================
VIDEO DRIVER
============================================================ */

View File

@ -41,7 +41,10 @@
#elif defined(HAVE_COCOA)
#include "../ui/drivers/ui_cocoa.m"
#include "../ui/drivers/cocoa/ui_cocoa_browser_window.m"
#include "../ui/drivers/cocoa/ui_cocoa_window.m"
#include "../ui/drivers/cocoa/ui_cocoa_msg_window.m"
#include "../ui/drivers/cocoa/ui_cocoa_application.m"
#endif
#endif

View File

@ -19,6 +19,7 @@
#include <stdlib.h>
#include <boolean.h>
#include <retro_environment.h>
#include "joypad_connection.h"
#include "../input_defines.h"
@ -37,46 +38,52 @@ enum connect_ps4_dpad_states
DPAD_OFF = 0x8
};
#if (__STDC_VERSION__ >= 199901L) || defined(__cplusplus)
typedef uint8_t bf_uint8_t;
#else
typedef int bf_uint8_t;
#endif
struct ps4buttons
{
#ifdef MSB_FIRST
uint8_t triangle : 1;
uint8_t circle : 1;
uint8_t cross : 1;
uint8_t square : 1;
uint8_t dpad : 4;
bf_uint8_t triangle : 1;
bf_uint8_t circle : 1;
bf_uint8_t cross : 1;
bf_uint8_t square : 1;
bf_uint8_t dpad : 4;
uint8_t r3 : 1;
uint8_t l3 : 1;
uint8_t options : 1;
uint8_t share : 1;
uint8_t r2 : 1;
uint8_t l2 : 1;
uint8_t r1 : 1;
uint8_t l1 : 1;
bf_uint8_t r3 : 1;
bf_uint8_t l3 : 1;
bf_uint8_t options : 1;
bf_uint8_t share : 1;
bf_uint8_t r2 : 1;
bf_uint8_t l2 : 1;
bf_uint8_t r1 : 1;
bf_uint8_t l1 : 1;
uint8_t reportcounter : 6;
uint8_t touchpad : 1;
uint8_t ps : 1;
bf_uint8_t reportcounter : 6;
bf_uint8_t touchpad : 1;
bf_uint8_t ps : 1;
#else
uint8_t dpad : 4;
uint8_t square : 1;
uint8_t cross : 1;
uint8_t circle : 1;
uint8_t triangle : 1;
bf_uint8_t dpad : 4;
bf_uint8_t square : 1;
bf_uint8_t cross : 1;
bf_uint8_t circle : 1;
bf_uint8_t triangle : 1;
uint8_t l1 : 1;
uint8_t r1 : 1;
uint8_t l2 : 1;
uint8_t r2 : 1;
uint8_t share : 1;
uint8_t options : 1;
uint8_t l3 : 1;
uint8_t r3 : 1;
bf_uint8_t l1 : 1;
bf_uint8_t r1 : 1;
bf_uint8_t l2 : 1;
bf_uint8_t r2 : 1;
bf_uint8_t share : 1;
bf_uint8_t options : 1;
bf_uint8_t l3 : 1;
bf_uint8_t r3 : 1;
uint8_t ps : 1;
uint8_t touchpad : 1;
uint8_t reportcounter : 6;
bf_uint8_t ps : 1;
bf_uint8_t touchpad : 1;
bf_uint8_t reportcounter : 6;
#endif
}__attribute__((packed));

View File

@ -27,7 +27,7 @@
#include "../verbosity.h"
#include "../command.h"
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
#include "input_remote.h"
#endif
@ -95,7 +95,7 @@ static turbo_buttons_t input_driver_turbo_btns;
#ifdef HAVE_COMMAND
static command_t *input_driver_command = NULL;
#endif
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
static input_remote_t *input_driver_remote = NULL;
#endif
static const input_driver_t *current_input = NULL;
@ -281,7 +281,7 @@ static retro_input_t input_driver_keys_pressed(void)
}
#endif
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
if (input_driver_remote)
state |= input_remote_key_pressed(key,0);
#endif
@ -436,7 +436,7 @@ void input_poll(void)
command_poll(input_driver_command);
#endif
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
if (input_driver_remote)
input_remote_poll(input_driver_remote);
#endif
@ -486,7 +486,7 @@ int16_t input_state(unsigned port, unsigned device,
input_state_overlay(&res, port, device, idx, id);
#endif
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
input_remote_state(&res, port, device, idx, id);
#endif
}
@ -877,7 +877,7 @@ void input_driver_deinit_command(void)
void input_driver_deinit_remote(void)
{
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
if (input_driver_remote)
input_remote_free(input_driver_remote);
input_driver_remote = NULL;
@ -886,7 +886,7 @@ void input_driver_deinit_remote(void)
bool input_driver_init_remote(void)
{
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
settings_t *settings = config_get_ptr();
if (!settings->network_remote_enable)

View File

@ -68,7 +68,9 @@ static input_device_driver_t *joypad_drivers[] = {
#ifdef HAVE_MFI
&mfi_joypad,
#endif
#ifdef HAVE_HID
&hid_joypad,
#endif
&null_joypad,
NULL,
};

View File

@ -41,7 +41,7 @@
struct input_remote
{
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
int net_fd[MAX_USERS];
#endif
@ -63,7 +63,7 @@ static input_remote_state_t *input_remote_get_state_ptr(void)
return &remote_st_ptr;
}
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
static bool input_remote_init_network(input_remote_t *handle,
uint16_t port, unsigned user)
{
@ -107,7 +107,7 @@ error:
input_remote_t *input_remote_new(uint16_t port)
{
unsigned user;
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
settings_t *settings = config_get_ptr();
#endif
input_remote_t *handle = (input_remote_t*)
@ -118,7 +118,7 @@ input_remote_t *input_remote_new(uint16_t port)
(void)port;
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
for(user = 0; user < settings->input.max_users; user ++)
{
handle->net_fd[user] = -1;
@ -130,7 +130,7 @@ input_remote_t *input_remote_new(uint16_t port)
return handle;
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
error:
input_remote_free(handle);
return NULL;
@ -140,7 +140,7 @@ error:
void input_remote_free(input_remote_t *handle)
{
unsigned user;
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
settings_t *settings = config_get_ptr();
for(user = 0; user < settings->input.max_users; user ++)
@ -150,7 +150,7 @@ void input_remote_free(input_remote_t *handle)
free(handle);
}
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
static void input_remote_parse_packet(char *buffer, unsigned size, unsigned user)
{
input_remote_state_t *ol_state = input_remote_get_state_ptr();
@ -212,7 +212,7 @@ void input_remote_poll(input_remote_t *handle)
{
if (settings->network_remote_enable_user[user])
{
#if defined(HAVE_NETWORK_GAMEPAD) && defined(HAVE_NETPLAY)
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
char buf[8];
ssize_t ret;
fd_set fds;

View File

@ -26,6 +26,7 @@
#include <retro_inline.h>
#include <algorithms/mismatch.h>
#include <compat/intrinsics.h>
#if defined(__x86_64__) || defined(__i386__) || defined(__i486__) || defined(__i686__)
#define CPU_X86
@ -40,32 +41,6 @@
#include <emmintrin.h>
#endif
#if __SSE2__
#if defined(__GNUC__)
static INLINE int compat_ctz(unsigned x)
{
return __builtin_ctz(x);
}
#else
/* Only checks at nibble granularity,
* because that's what we need. */
static INLINE int compat_ctz(unsigned x)
{
if (x & 0x000f)
return 0;
if (x & 0x00f0)
return 4;
if (x & 0x0f00)
return 8;
if (x & 0xf000)
return 12;
return 16;
}
#endif
#endif
/* There's no equivalent in libc, you'd think so ...
* std::mismatch exists, but it's not optimized at all. */
size_t find_change(const uint16_t *a, const uint16_t *b)

View File

@ -1809,10 +1809,10 @@ void rglDeleteVertexArrays(GLsizei n, const GLuint *arrays)
* OpenGL : 3.2
* OpenGLES : 3.0
*/
GLsync rglFenceSync(GLenum condition, GLbitfield flags)
void *rglFenceSync(GLenum condition, GLbitfield flags)
{
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) && defined(HAVE_OPENGLES3)
return glFenceSync(condition, flags);
return (GLsync)glFenceSync(condition, flags);
#endif
}
@ -1822,10 +1822,10 @@ GLsync rglFenceSync(GLenum condition, GLbitfield flags)
* OpenGL : 3.2
* OpenGLES : 3.0
*/
void rglWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
void rglWaitSync(void *sync, GLbitfield flags, GLuint64 timeout)
{
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) && defined(HAVE_OPENGLES3)
glWaitSync(sync, flags, timeout);
glWaitSync((GLsync)sync, flags, timeout);
#endif
}

View File

@ -0,0 +1,89 @@
/* Copyright (C) 2010-2016 The RetroArch team
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (intrinsics.h).
* ---------------------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge,
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __LIBRETRO_SDK_COMPAT_INTRINSICS_H
#define __LIBRETRO_SDK_COMPAT_INTRINSICS_H
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <retro_common_api.h>
#include <retro_inline.h>
#ifdef _MSC_VER
#include <intrin.h>
#endif
RETRO_BEGIN_DECLS
/* Count Leading Zero, unsigned 16bit input value */
static INLINE unsigned compat_clz_u16(uint16_t val)
{
#ifdef __GNUC__
return __builtin_clz(val << 16 | 0x8000);
#else
unsigned ret = 0;
while(!(val & 0x8000) && ret < 16)
{
val <<= 1;
ret++;
}
return ret;
#endif
}
/* Count Trailing Zero */
#if defined(__GNUC__)
static INLINE int compat_ctz(unsigned x)
{
return __builtin_ctz(x);
}
#elif _MSC_VER >= 1400
static INLINE int compat_ctz(unsigned x)
{
unsigned long r = 0;
_BitScanReverse((unsigned long*)&r, x);
return (int)r;
}
#else
/* Only checks at nibble granularity,
* because that's what we need. */
static INLINE int compat_ctz(unsigned x)
{
if (x & 0x000f)
return 0;
if (x & 0x00f0)
return 4;
if (x & 0x0f00)
return 8;
if (x & 0xf000)
return 12;
return 16;
}
#endif
RETRO_END_DECLS
#endif

View File

@ -393,8 +393,8 @@ void rglTexSubImage2D( GLenum target,
GLenum type,
const GLvoid * pixels);
void rglDeleteVertexArrays(GLsizei n, const GLuint *arrays);
GLsync rglFenceSync(GLenum condition, GLbitfield flags);
void rglWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
void *rglFenceSync(GLenum condition, GLbitfield flags);
void rglWaitSync(void *data, GLbitfield flags, GLuint64 timeout);
RETRO_END_DECLS

View File

@ -44,12 +44,6 @@ typedef void *GLeglImageOES;
#if !defined(GL_OES_fixed_point) && !defined(HAVE_OPENGLES2)
typedef GLint GLfixed;
#endif
#if defined(OSX) && !defined(MAC_OS_X_VERSION_10_7)
typedef long long int GLint64;
typedef unsigned long long int GLuint64;
typedef unsigned long long int GLuint64EXT;
typedef struct __GLsync *GLsync;
#endif
typedef void (GL_APIENTRYP RGLSYMGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
typedef void (GL_APIENTRYP RGLSYMGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
typedef void (GL_APIENTRYP RGLSYMGLDEBUGMESSAGECALLBACKKHRPROC) (RGLGENGLDEBUGPROCKHR callback, const void *userParam);

View File

@ -202,6 +202,7 @@ struct string_list *string_list_new_special(enum string_list_type type,
}
break;
case STRING_LIST_INPUT_HID_DRIVERS:
#ifdef HAVE_HID
for (i = 0; hid_driver_find_handle(i); i++)
{
const char *opt = hid_driver_find_ident(i);
@ -209,6 +210,7 @@ struct string_list *string_list_new_special(enum string_list_type type,
string_list_append(s, opt, attr);
}
#endif
break;
case STRING_LIST_INPUT_JOYPAD_DRIVERS:
for (i = 0; joypad_driver_find_handle(i); i++)

View File

@ -48,34 +48,19 @@
#include "../../verbosity.h"
#include "../../tasks/tasks_internal.h"
/* this is the main control function, it opens and closes windows, */
static void nk_menu_main(nk_menu_handle_t *nk)
{
settings_t *settings = config_get_ptr();
struct nk_context *ctx = &nk->ctx;
static char out[PATH_MAX_LENGTH];
if (nk->window[NK_WND_SETTINGS].open)
nk_wnd_settings(nk);
if (nk->window[NK_WND_FILE_PICKER].open)
{
if (nk_wnd_file_picker(nk, settings->directory.menu_content, out, ".zip"))
{
RARCH_LOG ("%s selected\n", out);
nk_window_close(&nk->ctx, "Select File");
}
}
if (nk->window[NK_WND_SHADER_PARAMETERS].open)
nk_wnd_shader_parameters(nk);
if (nk->window[NK_WND_MAIN].open)
nk_wnd_main(nk);
nk->window[NK_WND_SETTINGS].open = !nk_window_is_closed(ctx, "Settings");
nk->window[NK_WND_FILE_PICKER].open = !nk_window_is_closed(ctx, "Select File");
nk->window[NK_WND_SHADER_PARAMETERS].open = !nk_window_is_closed(ctx, "Shader Parameters");
nk->window[NK_WND_MAIN].open = !nk_window_is_closed(ctx, "Main");
nk_wnd_main(nk, "Demo");
nk_buffer_info(&nk->status, &nk->ctx.memory);
}
@ -311,7 +296,6 @@ static void *nk_menu_init(void **userdata)
nk->window[i].open = true;
#else
nk->window[NK_WND_MAIN].open = true;
nk->window[NK_WND_FILE_PICKER].open = true;
#endif
return menu;

View File

@ -32,8 +32,10 @@
#include "../../menu_display.h"
#include "../../../gfx/video_shader_driver.h"
#ifdef HAVE_GLSL
#include "../../../gfx/drivers/gl_shaders/pipeline_nuklear.glsl.vert.h"
#include "../../../gfx/drivers/gl_shaders/pipeline_nuklear.glsl.frag.h"
#endif
struct nk_font *font;
struct nk_font_atlas atlas;

View File

@ -86,8 +86,8 @@ typedef struct nk_menu_handle
} nk_menu_handle_t;
void nk_wnd_shader_parameters(nk_menu_handle_t *nk);
void nk_wnd_main(nk_menu_handle_t *nk);
bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, char* out, const char* filter);
void nk_wnd_main(nk_menu_handle_t *nk, const char* title);
bool nk_wnd_file_picker(nk_menu_handle_t *nk, char* title, char* in, char* out, char* filter);
void nk_wnd_settings(nk_menu_handle_t *nk);
void nk_wnd_set_state(nk_menu_handle_t *nk, const int id,
struct nk_vec2 pos, struct nk_vec2 size);

View File

@ -61,7 +61,7 @@ void load_icons(nk_menu_handle_t *nk)
assets_loaded = true;
}
bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, char* out, const char* filter)
bool nk_wnd_file_picker(nk_menu_handle_t *nk, char* title, char* in, char* out, char* filter)
{
struct nk_panel layout;
struct nk_context *ctx = &nk->ctx;
@ -80,7 +80,6 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, char* out, const c
if (!string_is_empty(in) && string_is_empty(path))
{
RARCH_LOG("beep\n");
strlcpy(path, in, sizeof(path));
files = dir_list_new(path, filter, true, true);
}
@ -88,7 +87,7 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, char* out, const c
if (!assets_loaded)
load_icons(nk);
if (nk_begin(ctx, &layout, "Select File", nk_rect(10, 10, 500, 400),
if (nk_begin(ctx, &layout, title, nk_rect(10, 10, 500, 400),
NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE|NK_WINDOW_MOVABLE|
NK_WINDOW_BORDER))
{
@ -136,7 +135,12 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, char* out, const c
nk_layout_row_dynamic(ctx, 30, 1);
{
if (nk_button_text(ctx, "OK", 2, NK_BUTTON_DEFAULT))
{
ret = true;
strlcpy(out, path, sizeof(path));
nk->window[NK_WND_FILE_PICKER].open = false;
path[0] = '\0';
}
}
}
@ -144,7 +148,6 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, char* out, const c
dir_list_sort(files, true);
/* copy the path variable to out*/
strlcpy(out, path, sizeof(path));
/* save position and size to restore after context reset */
nk_wnd_set_state(nk, id, nk_window_get_position(ctx), nk_window_get_size(ctx));

View File

@ -29,19 +29,72 @@
#include "../../menu_driver.h"
#include "../../menu_hash.h"
void nk_wnd_main(nk_menu_handle_t *nk)
static char* out;
static char core[PATH_MAX_LENGTH] = {0};
static char content[PATH_MAX_LENGTH] = {0};
float ratio[] = {0.85f, 0.15f};
void nk_wnd_main(nk_menu_handle_t *nk, const char* title)
{
unsigned i;
video_shader_ctx_t shader_info;
struct nk_panel layout;
struct nk_context *ctx = &nk->ctx;
const int id = NK_WND_MAIN;
settings_t *settings = config_get_ptr();
if (nk_begin(ctx, &layout, "Main", nk_rect(240, 10, 300, 400),
static char picker_filter[PATH_MAX_LENGTH];
static char picker_title[PATH_MAX_LENGTH];
static char* picker_startup_dir;
int len_core, len_content = 0;
if (!out)
out = &core;
if (!string_is_empty(core))
len_core = strlen(path_basename(core));
if (!string_is_empty(content))
len_content = strlen(content);
if (nk->window[NK_WND_FILE_PICKER].open)
{
if (nk_wnd_file_picker(nk, picker_title, picker_startup_dir, out, picker_filter))
{
RARCH_LOG ("%s selected\n", out);
nk_window_close(&nk->ctx, picker_title);
}
}
if (nk_begin(ctx, &layout, title, nk_rect(240, 10, 600, 400),
NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE|NK_WINDOW_MOVABLE|
NK_WINDOW_SCALABLE|NK_WINDOW_BORDER))
{
nk_layout_row_dynamic(ctx, 30, 1);
nk_label(ctx,"Core:", NK_TEXT_LEFT);
nk_layout_row(ctx, NK_DYNAMIC, 30, 3, ratio);
nk_edit_string(ctx, NK_EDIT_SIMPLE, path_basename(core), &len_core, 64, nk_filter_default);
if (nk_button_text(ctx, "...", 3, NK_BUTTON_DEFAULT))
{
out = &core;
strlcpy(picker_title, "Select core", sizeof(picker_title));
strlcpy(picker_filter, ".dll", sizeof(picker_filter));
picker_startup_dir = settings->directory.libretro;
nk->window[NK_WND_FILE_PICKER].open = true;
}
nk_layout_row_dynamic(ctx, 30, 1);
nk_label(ctx,"Content:", NK_TEXT_LEFT);
nk_layout_row(ctx, NK_DYNAMIC, 30, 3, ratio);
nk_edit_string(ctx, NK_EDIT_SIMPLE, content, &len_content, 64, nk_filter_default);
if (nk_button_text(ctx, "...", 3, NK_BUTTON_DEFAULT))
{
out = &content;
strlcpy(picker_title, "Select content", sizeof(picker_title));
strlcpy(picker_filter, ".zip", sizeof(picker_filter));
picker_startup_dir = settings->directory.menu_content;
nk->window[NK_WND_FILE_PICKER].open = true;
}
}
/* save position and size to restore after context reset */

View File

@ -351,6 +351,7 @@ static const char *xmb_thumbnails_ident(void)
return "OFF";
}
#ifdef HAVE_SHADERPIPELINE
static float *xmb_gradient_ident(void)
{
settings_t *settings = config_get_ptr();
@ -380,6 +381,7 @@ static float *xmb_gradient_ident(void)
return &gradient_legacy_red[0];
}
#endif
static void xmb_fill_default_background_path(xmb_handle_t *xmb,
char *path, size_t size)

View File

@ -31,6 +31,7 @@ const char *menu_hash_to_str(uint32_t hash)
if (!settings)
return "null";
#ifdef HAVE_LANGEXTRA
switch (settings->user_language)
{
case RETRO_LANGUAGE_FRENCH:
@ -60,6 +61,7 @@ const char *menu_hash_to_str(uint32_t hash)
default:
break;
}
#endif
if (ret && !string_is_equal(ret, "null"))
return ret;
@ -75,6 +77,7 @@ int menu_hash_get_help(uint32_t hash, char *s, size_t len)
if (!settings)
return -1;
#ifdef HAVE_LANGEXTRA
switch (settings->user_language)
{
case RETRO_LANGUAGE_FRENCH:
@ -104,6 +107,7 @@ int menu_hash_get_help(uint32_t hash, char *s, size_t len)
default:
break;
}
#endif
if (ret == 0)
return ret;

View File

@ -1147,6 +1147,7 @@ static void setting_get_string_representation_uint_autosave_interval(void *data,
}
#endif
#ifdef HAVE_LANGEXTRA
static void setting_get_string_representation_uint_user_language(void *data,
char *s, size_t len)
{
@ -1171,6 +1172,7 @@ static void setting_get_string_representation_uint_user_language(void *data,
if (settings)
strlcpy(s, modes[settings->user_language], len);
}
#endif
static void setting_get_string_representation_uint_libretro_log_level(void *data,
char *s, size_t len)
@ -3573,7 +3575,7 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD)
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD)
CONFIG_ACTION(
list, list_info,
menu_hash_to_str(MENU_LABEL_START_NET_RETROPAD),
@ -6776,6 +6778,7 @@ static bool setting_append_list(
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
#ifdef HAVE_LANGEXTRA
CONFIG_UINT(
list, list_info,
&settings->user_language,
@ -6799,6 +6802,7 @@ static bool setting_append_list(
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_REFRESH);
(*list)[list_info->index - 1].get_string_representation =
&setting_get_string_representation_uint_user_language;
#endif
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);

View File

@ -30,6 +30,7 @@ const char *msg_hash_to_str(uint32_t hash)
if (!settings)
goto end;
#ifdef HAVE_LANGEXTRA
switch (settings->user_language)
{
case RETRO_LANGUAGE_FRENCH:
@ -64,6 +65,7 @@ const char *msg_hash_to_str(uint32_t hash)
default:
break;
}
#endif
if (ret && !string_is_equal(ret, "null"))
return ret;

View File

@ -53,7 +53,7 @@ else
GLES_LIB := -lGLESv2
endif
DEFINES += -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_EGL -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_ZLIB_DEFLATE -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DINLINE=inline -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_SHADERPIPELINE -DHAVE_LIBRETRODB -DHAVE_STB_FONT
DEFINES += -DRARCH_MOBILE -DHAVE_GRIFFIN -DHAVE_LANGEXTRA -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_EGL -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_ZLIB_DEFLATE -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DINLINE=inline -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_SHADERPIPELINE -DHAVE_LIBRETRODB -DHAVE_STB_FONT
DEFINES += -DWANT_IFADDRS
ifeq ($(HAVE_VULKAN),1)

View File

@ -53,7 +53,7 @@ else
GLES_LIB := -lGLESv2
endif
DEFINES += -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_ZLIB_DEFLATE -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DINLINE=inline -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_SHADERPIPELINE -std=gnu99 -DHAVE_LIBRETRODB -DHAVE_STB_FONT
DEFINES += -DRARCH_MOBILE -DHAVE_GRIFFIN -DHAVE_LANGEXTRA -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_ZLIB_DEFLATE -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DINLINE=inline -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_SHADERPIPELINE -std=gnu99 -DHAVE_LIBRETRODB -DHAVE_STB_FONT
DEFINES += -DWANT_IFADDRS
ifeq ($(HAVE_VULKAN),1)

View File

@ -383,6 +383,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.5;
OTHER_CFLAGS = (
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORETEXT",
@ -448,6 +449,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.5;
OTHER_CFLAGS = (
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_IOHIDMANAGER",
@ -515,6 +517,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.5;
OTHER_CFLAGS = (
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORETEXT",
@ -579,6 +582,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.5;
OTHER_CFLAGS = (
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_IOHIDMANAGER",

View File

@ -282,6 +282,7 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_STB_FONT",
"-DHAVE_IOHIDMANAGER",
@ -315,7 +316,7 @@
"-DHAVE_ZARCH",
"-DHAVE_HID",
"-DHAVE_XMB",
"-DHAVE_SHADERPIPELINE",
"-DHAVE_SHADERPIPELINE",
"-DHAVE_MMAP",
"-DHAVE_LIBRETRODB",
"-DHAVE_FILTERS_BUILTIN",
@ -355,6 +356,7 @@
"-DNS_BLOCK_ASSERTIONS=1",
"-DNDEBUG",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_STB_FONT",
"-DHAVE_IOHIDMANAGER",
@ -388,7 +390,7 @@
"-DHAVE_ZARCH",
"-DHAVE_HID",
"-DHAVE_XMB",
"-DHAVE_SHADERPIPELINE",
"-DHAVE_SHADERPIPELINE",
"-DHAVE_MMAP",
"-DHAVE_LIBRETRODB",
"-DHAVE_FILTERS_BUILTIN",

View File

@ -521,6 +521,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",
@ -598,6 +599,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",
@ -646,6 +648,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",
@ -723,6 +726,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORETEXT",
@ -796,6 +800,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",
@ -841,6 +846,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",
@ -918,6 +924,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",
@ -984,6 +991,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",
@ -1051,6 +1059,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",
@ -1127,6 +1136,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",
@ -1175,6 +1185,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_AVFOUNDATION",
"-DHAVE_GRIFFIN",
"-DHAVE_LANGEXTRA",
"-DHAVE_CHEEVOS",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORELOCATION",

View File

@ -113,7 +113,7 @@
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_XUI;HAVE_MENU;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORKING;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_XBOX;DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_XUI;HAVE_MENU;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORKING;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\deps\zlib;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
@ -152,7 +152,7 @@
<PREfast>AnalyzeOnly</PREfast>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_XUI;HAVE_MENU;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_XUI;HAVE_MENU;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\deps\zlib;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
@ -192,7 +192,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_XUI;HAVE_MENU;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_XUI;HAVE_MENU;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\deps\zlib;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
@ -237,7 +237,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XUI;HAVE_MENU;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XUI;HAVE_MENU;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\deps\zlib;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
@ -279,7 +279,7 @@
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XUI;HAVE_MENU;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XUI;HAVE_MENU;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\deps\zlib;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
@ -321,7 +321,7 @@
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_XUI;HAVE_MENU;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);DONT_HAVE_STATE_TRACKER;HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_XUI;HAVE_MENU;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_EXEC;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_HLSL;HAVE_D3D9;HAVE_D3D;RARCH_INTERNAL;MSB_FIRST;_XBOX360;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_XAUDIO;HAVE_RPNG;HAVE_RJPEG;HAVE_THREADS;HAVE_BUILTIN_AUTOCONFIG;HAVE_FILTERS_BUILTIN</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\deps\zlib;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>

View File

@ -22,7 +22,7 @@
Optimization="3"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\libretro-common\include&quot;;&quot;$(SolutionDir)\..\..\libretro-common\include\compat\msvc&quot;;&quot;$(SolutionDir)\msvc-71&quot;;&quot;$(SolutionDir)\..\..\deps\zlib&quot;"
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
MinimalRebuild="TRUE"
BasicRuntimeChecks="0"
RuntimeLibrary="1"
@ -72,7 +72,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\libretro-common\include&quot;;&quot;$(SolutionDir)\..\..\libretro-common\include\compat\msvc&quot;;&quot;$(SolutionDir)\msvc-71&quot;;&quot;$(SolutionDir)\..\..\deps\zlib&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@ -127,7 +127,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\libretro-common\include&quot;;&quot;$(SolutionDir)\..\..\libretro-common\include\compat\msvc&quot;;&quot;$(SolutionDir)\msvc-71&quot;;&quot;$(SolutionDir)\..\..\deps\zlib&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@ -188,7 +188,7 @@
EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\libretro-common\include&quot;;&quot;$(SolutionDir)\..\..\libretro-common\include\compat\msvc&quot;;&quot;$(SolutionDir)\msvc-71&quot;;&quot;$(SolutionDir)\..\..\deps\zlib&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_LANGEXTRA;inline=_inline;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@ -241,7 +241,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\libretro-common\include&quot;;&quot;$(SolutionDir)\..\..\libretro-common\include\compat\msvc&quot;;&quot;$(SolutionDir)\msvc-71&quot;;&quot;$(SolutionDir)\..\..\deps\zlib&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@ -300,7 +300,7 @@
EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\libretro-common\include&quot;;&quot;$(SolutionDir)\..\..\libretro-common\include\compat\msvc&quot;;&quot;$(SolutionDir)\msvc-71&quot;;&quot;$(SolutionDir)\..\..\deps\zlib&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_LANGEXTRA;inline=_inline;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@ -353,7 +353,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\libretro-common\include&quot;;&quot;$(SolutionDir)\..\..\libretro-common\include\compat\msvc&quot;;&quot;$(SolutionDir)\msvc-71&quot;;&quot;$(SolutionDir)\..\..\deps\zlib&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;DONT_HAVE_STATE_TRACKER;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN;HAVE_BUILTIN_AUTOCONFIG"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"

View File

@ -100,7 +100,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_GRIFFIN;HAVE_FBO;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\gfx\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<CompileAs>CompileAsCpp</CompileAs>
@ -120,7 +120,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\gfx\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<CompileAs>CompileAsCpp</CompileAs>
@ -142,7 +142,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_GRIFFIN;HAVE_FBO;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\gfx\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<CompileAs>CompileAsCpp</CompileAs>
@ -167,7 +167,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;WANT_ZLIB;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;WANT_ZLIB;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\gfx\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<CompileAs>CompileAsCpp</CompileAs>

View File

@ -47,6 +47,7 @@
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="HAVE_LANGEXTRA"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
@ -179,6 +180,7 @@
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="HAVE_LANGEXTRA"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
@ -313,6 +315,7 @@
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="HAVE_LANGEXTRA"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
@ -448,6 +451,7 @@
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="HAVE_LANGEXTRA"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
@ -581,6 +585,7 @@
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="HAVE_LANGEXTRA"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
@ -714,6 +719,7 @@
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="HAVE_LANGEXTRA"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>
@ -848,6 +854,7 @@
<listOptionValue builtIn="false" value="SINC_LOWER_QUALITY"/>
<listOptionValue builtIn="false" value="HAVE_FBO"/>
<listOptionValue builtIn="false" value="HAVE_GRIFFIN"/>
<listOptionValue builtIn="false" value="HAVE_LANGEXTRA"/>
<listOptionValue builtIn="false" value="__LIBRETRO__"/>
<listOptionValue builtIn="false" value="HAVE_DYNAMIC"/>
<listOptionValue builtIn="false" value="HAVE_ZLIB"/>

View File

@ -161,14 +161,14 @@ if [ "$HAVE_NETWORKING" = 'yes' ]; then
fi
fi
HAVE_NETWORK_CMD=yes
HAVE_NETWORK_GAMEPAD=yes
HAVE_NETWORKGAMEPAD=yes
[ "$HAVE_NETPLAY" != 'no' ] && HAVE_NETPLAY='yes'
else
echo "Warning: All networking features have been disabled."
HAVE_NETWORK_CMD='no'
HAVE_NETPLAY='no'
HAVE_NETWORK_GAMEPAD='no'
HAVE_NETWORKGAMEPAD='no'
fi
check_lib STDIN_CMD "$CLIB" fcntl

View File

@ -21,6 +21,8 @@ C89_FFMPEG=no
HAVE_SSA=auto # SSA/ASS for FFmpeg subtitle support
HAVE_DYLIB=auto # Dynamic loading support
HAVE_NETWORKING=auto # Networking features (recommended)
HAVE_NETWORKGAMEPAD=auto # Networked game pad (plus baked-in core)
C89_NETWORKGAMEPAD=no
HAVE_NETPLAY=auto # Netplay support (requires networking)
HAVE_D3D9=yes # Direct3D 9 support
HAVE_OPENGL=auto # OpenGL support
@ -82,3 +84,5 @@ HAVE_RPNG=yes # RPNG support
HAVE_RBMP=yes # RBMP support
HAVE_RJPEG=yes # RJPEG support
HAVE_RTGA=yes # RTGA support
HAVE_HID=yes # Low-level HID (Human Interface Device) support
HAVE_LANGEXTRA=yes # Multi-language support

View File

@ -1713,7 +1713,7 @@ bool task_push_content_load_default(
/* First we determine if we are loading from a menu */
switch (mode)
{
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD)
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD)
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
#endif
case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU:
@ -1845,7 +1845,7 @@ bool task_push_content_load_default(
runloop_ctl(RUNLOOP_CTL_DATA_DEINIT, NULL);
runloop_ctl(RUNLOOP_CTL_TASK_INIT, NULL);
break;
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD)
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD)
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
retroarch_set_current_core_type(CORE_TYPE_NETRETROPAD, true);
break;
@ -1859,7 +1859,7 @@ bool task_push_content_load_default(
{
case CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE:
case CONTENT_MODE_LOAD_FROM_CLI:
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD)
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD)
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
#endif
case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU:
@ -1894,7 +1894,7 @@ bool task_push_content_load_default(
switch (mode)
{
case CONTENT_MODE_LOAD_CONTENT_FROM_PLAYLIST_FROM_MENU:
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORK_GAMEPAD)
#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD)
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
#endif
break;

View File

@ -18,7 +18,12 @@
#include <sys/types.h>
#include <string.h>
#include <time.h>
#ifdef _WIN32
#include <direct.h>
#else
#include <unistd.h>
#endif
#include <errno.h>
#include <lists/string_list.h>

View File

@ -33,7 +33,9 @@
#include <string/stdstring.h>
#include <gfx/scaler/scaler.h>
#ifdef HAVE_RBMP
#include <formats/rbmp.h>
#endif
#if defined(HAVE_ZLIB_DEFLATE) && defined(HAVE_RPNG)
#include <formats/rpng.h>
@ -112,7 +114,7 @@ static bool screenshot_dump(
width * 3
);
free(out_buffer);
#else
#elif defined(HAVE_RBMP)
enum rbmp_source_type bmp_type = RBMP_SOURCE_TYPE_DONT_CARE;
if (bgr24)

View File

@ -112,8 +112,6 @@ void get_ios_version(int *major, int *minor);
#endif
extern void apple_display_alert(const char *message, const char *title);
#define BOXSTRING(x) [NSString stringWithUTF8String:x]
#define BOXINT(x) [NSNumber numberWithInt:x]
#define BOXUINT(x) [NSNumber numberWithUnsignedInt:x]

View File

@ -18,8 +18,9 @@
#include <sys/stat.h>
#include "cocoa_common.h"
#ifdef HAVE_COCOA
#include "ui_cocoa_window.h"
#include "../ui_cocoa.h"
#endif
#include "../../../verbosity.h"
/* Define compatibility symbols and categories. */

View File

@ -0,0 +1,51 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <objc/objc-runtime.h>
#include "cocoa_common.h"
#include "../../ui_companion_driver.h"
static bool ui_application_cocoa_pending_events(void)
{
NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
if (!event)
return false;
return true;
}
static void ui_application_cocoa_process_events(void)
{
while (1)
{
NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
if (!event)
break;
[event retain];
[NSApp sendEvent: event];
[event release];
}
}
const ui_application_t ui_application_cocoa = {
ui_application_cocoa_pending_events,
ui_application_cocoa_process_events,
"cocoa"
};

View File

@ -0,0 +1,65 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "cocoa_common.h"
#include "../../ui_companion_driver.h"
static bool ui_browser_window_cocoa_open(ui_browser_window_state_t *state)
{
NSOpenPanel* panel = (NSOpenPanel*)[NSOpenPanel openPanel];
NSArray *filetypes = NULL;
if (state->filters && !string_is_empty(state->filters))
filetypes = [[NSArray alloc] initWithObjects:BOXSTRING(state->filters), BOXSTRING(state->filters_title), nil];
[panel setAllowedFileTypes:filetypes];
#if defined(MAC_OS_X_VERSION_10_6)
[panel setMessage:BOXSTRING(state->title)];
if ([panel runModalForDirectory:BOXSTRING(state->startdir) file:nil] != 1)
return false;
#else
[panel setTitle:NSLocalizedString(BOXSTRING(state->title), BOXSTRING("open panel"))];
[panel setDirectory:BOXSTRING(state->startdir)];
[panel setCanChooseDirectories:NO];
[panel setCanChooseFiles:YES];
[panel setAllowsMultipleSelection:NO];
[panel setTreatsFilePackagesAsDirectories:NO];
NSInteger result = [panel runModal];
if (result != 1)
return false;
#endif
NSURL *url = (NSURL*)panel.URL;
const char *res_path = [url.path UTF8String];
state->result = strdup(res_path);
return true;
}
static bool ui_browser_window_cocoa_save(ui_browser_window_state_t *state)
{
return false;
}
const ui_browser_window_t ui_browser_window_cocoa = {
ui_browser_window_cocoa_open,
ui_browser_window_cocoa_save,
"cocoa"
};

View File

@ -0,0 +1,138 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <string/stdstring.h>
#include "cocoa_common.h"
#include "../../ui_companion_driver.h"
extern id apple_platform;
static enum ui_msg_window_response ui_msg_window_cocoa_dialog(ui_msg_window_state *state, enum ui_msg_window_type type)
{
NSInteger response;
NSAlert* alert = [[NSAlert new] autorelease];
if (!string_is_empty(state->title))
[alert setMessageText:BOXSTRING(state->title)];
[alert setInformativeText:BOXSTRING(state->text)];
switch (state->buttons)
{
case UI_MSG_WINDOW_OK:
[alert addButtonWithTitle:BOXSTRING("OK")];
break;
case UI_MSG_WINDOW_YESNO:
[alert addButtonWithTitle:BOXSTRING("Yes")];
[alert addButtonWithTitle:BOXSTRING("No")];
break;
case UI_MSG_WINDOW_OKCANCEL:
[alert addButtonWithTitle:BOXSTRING("OK")];
[alert addButtonWithTitle:BOXSTRING("Cancel")];
break;
case UI_MSG_WINDOW_YESNOCANCEL:
[alert addButtonWithTitle:BOXSTRING("Yes")];
[alert addButtonWithTitle:BOXSTRING("No")];
[alert addButtonWithTitle:BOXSTRING("Cancel")];
break;
}
switch (type)
{
case UI_MSG_WINDOW_TYPE_ERROR:
[alert setAlertStyle:NSCriticalAlertStyle];
break;
case UI_MSG_WINDOW_TYPE_WARNING:
[alert setAlertStyle:NSWarningAlertStyle];
break;
case UI_MSG_WINDOW_TYPE_QUESTION:
[alert setAlertStyle:NSInformationalAlertStyle];
break;
case UI_MSG_WINDOW_TYPE_INFORMATION:
[alert setAlertStyle:NSInformationalAlertStyle];
break;
}
[alert beginSheetModalForWindow:((RetroArch_OSX*)[[NSApplication sharedApplication] delegate]).window
modalDelegate:apple_platform
didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:)
contextInfo:nil];
response = [[NSApplication sharedApplication] runModalForWindow:[alert window]];
switch (state->buttons)
{
case UI_MSG_WINDOW_OK:
if (response == NSAlertFirstButtonReturn)
return UI_MSG_RESPONSE_OK;
break;
case UI_MSG_WINDOW_OKCANCEL:
if (response == NSAlertFirstButtonReturn)
return UI_MSG_RESPONSE_OK;
if (response == NSAlertSecondButtonReturn)
return UI_MSG_RESPONSE_CANCEL;
break;
case UI_MSG_WINDOW_YESNO:
if (response == NSAlertFirstButtonReturn)
return UI_MSG_RESPONSE_YES;
if (response == NSAlertSecondButtonReturn)
return UI_MSG_RESPONSE_NO;
break;
case UI_MSG_WINDOW_YESNOCANCEL:
if (response == NSAlertFirstButtonReturn)
return UI_MSG_RESPONSE_YES;
if (response == NSAlertSecondButtonReturn)
return UI_MSG_RESPONSE_NO;
if (response == NSAlertThirdButtonReturn)
return UI_MSG_RESPONSE_CANCEL;
break;
}
return UI_MSG_RESPONSE_NA;
}
static enum ui_msg_window_response ui_msg_window_cocoa_error(ui_msg_window_state *state)
{
return ui_msg_window_cocoa_dialog(state, UI_MSG_WINDOW_TYPE_ERROR);
}
static enum ui_msg_window_response ui_msg_window_cocoa_information(ui_msg_window_state *state)
{
return ui_msg_window_cocoa_dialog(state, UI_MSG_WINDOW_TYPE_INFORMATION);
}
static enum ui_msg_window_response ui_msg_window_cocoa_question(ui_msg_window_state *state)
{
return ui_msg_window_cocoa_dialog(state, UI_MSG_WINDOW_TYPE_QUESTION);
}
static enum ui_msg_window_response ui_msg_window_cocoa_warning(ui_msg_window_state *state)
{
return ui_msg_window_cocoa_dialog(state, UI_MSG_WINDOW_TYPE_WARNING);
}
const ui_msg_window_t ui_msg_window_cocoa = {
ui_msg_window_cocoa_error,
ui_msg_window_cocoa_information,
ui_msg_window_cocoa_question,
ui_msg_window_cocoa_warning,
"cocoa"
};

View File

@ -20,7 +20,7 @@
#include <string.h>
#include "cocoa_common.h"
#include "ui_cocoa_window.h"
#include "../ui_cocoa.h"
#include "../../ui_companion_driver.h"
static void ui_window_cocoa_destroy(void *data)

View File

@ -0,0 +1,37 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "../../ui_companion_driver.h"
static bool ui_application_null_pending_events(void)
{
return true;
}
static void ui_application_null_process_events(void)
{
}
const ui_application_t ui_application_null = {
ui_application_null_pending_events,
ui_application_null_process_events,
"null"
};

View File

@ -0,0 +1,38 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "../../ui_companion_driver.h"
static bool ui_browser_window_null_open(ui_browser_window_state_t *state)
{
return false;
}
static bool ui_browser_window_null_save(ui_browser_window_state_t *state)
{
return false;
}
const ui_browser_window_t ui_browser_window_null = {
ui_browser_window_null_open,
ui_browser_window_null_save,
"null"
};

View File

@ -0,0 +1,50 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "../../ui_companion_driver.h"
static enum ui_msg_window_response ui_msg_window_null_error(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
static enum ui_msg_window_response ui_msg_window_null_information(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
static enum ui_msg_window_response ui_msg_window_null_question(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
static enum ui_msg_window_response ui_msg_window_null_warning(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
const ui_msg_window_t ui_msg_window_null = {
ui_msg_window_null_error,
ui_msg_window_null_information,
ui_msg_window_null_question,
ui_msg_window_null_warning,
"null"
};

View File

@ -21,11 +21,11 @@
#include "../../ui_companion_driver.h"
void ui_window_null_destroy(void *data)
static void ui_window_null_destroy(void *data)
{
}
void ui_window_null_set_focused(void *data)
static void ui_window_null_set_focused(void *data)
{
}

View File

@ -14,8 +14,8 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _COCOA_WINDOW_UI
#define _COCOA_WINDOW_UI
#ifndef _COCOA_UI
#define _COCOA_UI
#include <stdint.h>
#include <stddef.h>
@ -23,12 +23,17 @@
#include <boolean.h>
#include <retro_common_api.h>
#include "cocoa_common.h"
#include "cocoa/cocoa_common.h"
#include "../../ui_companion_driver.h"
#include "../ui_companion_driver.h"
RETRO_BEGIN_DECLS
typedef struct ui_application_cocoa
{
void *empty;
} ui_application_cocoa_t;
typedef struct ui_window_cocoa
{
CocoaView *data;

View File

@ -35,7 +35,7 @@
#include "../../system.h"
#include "../../tasks/tasks_internal.h"
static id apple_platform;
id apple_platform;
static void app_terminate(void)
{
@ -205,26 +205,15 @@ static char** waiting_argv;
[self performSelectorOnMainThread:@selector(rarch_main) withObject:nil waitUntilDone:NO];
}
static void poll_iteration(void)
{
while (1)
{
NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
if (!event)
break;
[event retain];
[NSApp sendEvent: event];
[event release];
};
}
- (void) rarch_main
{
int ret = 0;
while (ret != -1)
{
unsigned sleep_ms = 0;
poll_iteration();
const ui_application_t *application = ui_companion_driver_get_application_ptr();
if (application)
application->process_events();
ret = runloop_iterate(&sleep_ms);
if (ret == 1 && sleep_ms > 0)
retro_sleep(sleep_ms);
@ -292,139 +281,125 @@ static void poll_iteration(void)
}
else
{
apple_display_alert("Cannot open multiple files", "RetroArch");
const ui_msg_window_t *msg_window = ui_companion_driver_get_msg_window_ptr();
if (msg_window)
{
ui_msg_window_state msg_window_state;
msg_window_state.text = strdup("Cannot open multiple files");
msg_window_state.title = strdup("RetroArch");
msg_window->information(&msg_window_state);
free(msg_window_state.text);
free(msg_window_state.title);
}
[sender replyToOpenOrPrint:NSApplicationDelegateReplyFailure];
}
}
static void open_core_handler(NSOpenPanel *panel, NSInteger result)
static void open_core_handler(ui_browser_window_state_t *state, bool result)
{
switch (result)
{
case 1: /* NSOKButton/NSModalResponseOK */
if (panel.URL)
{
settings_t *settings = config_get_ptr();
NSURL *url = (NSURL*)panel.URL;
NSString *__core = url.path;
if (!state)
return;
if (string_is_empty(state->result))
return;
if (!result)
return;
settings_t *settings = config_get_ptr();
if (!__core)
return;
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)state->result);
ui_companion_event_command(CMD_EVENT_LOAD_CORE);
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)__core.UTF8String);
ui_companion_event_command(CMD_EVENT_LOAD_CORE);
if (menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL)
if (menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL)
&& settings->set_supports_no_game_enable)
{
content_ctx_info_t content_info = {0};
runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL);
task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
NULL, NULL);
}
}
break;
case 0: /* NSCancelButton/NSModalResponseCancel */
break;
{
content_ctx_info_t content_info = {0};
runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL);
task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
NULL, NULL);
}
}
static void open_document_handler(NSOpenPanel *panel, NSInteger result)
static void open_document_handler(ui_browser_window_state_t *state, bool result)
{
switch (result)
if (!state)
return;
if (string_is_empty(state->result))
return;
if (!result)
return;
struct retro_system_info *system = NULL;
const char *core_name = NULL;
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET, &system);
if (system)
core_name = system->library_name;
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)state->result);
if (core_name)
{
case 1: /* NSOKButton/NSModalResponseOK */
if (panel.URL)
{
struct retro_system_info *system = NULL;
NSURL *url = (NSURL*)panel.URL;
NSString *__core = url.path;
const char *core_name = NULL;
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET, &system);
if (system)
core_name = system->library_name;
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)__core.UTF8String);
if (core_name)
{
content_ctx_info_t content_info = {0};
task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
NULL, NULL);
}
}
break;
case 0: /* NSCancelButton/NSModalResponseCancel */
break;
content_ctx_info_t content_info = {0};
task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
NULL, NULL);
}
}
- (IBAction)openCore:(id)sender {
NSOpenPanel* panel = (NSOpenPanel*)[NSOpenPanel openPanel];
settings_t *settings = config_get_ptr();
NSString *startdir = BOXSTRING(settings->directory.libretro);
NSArray *filetypes = [[NSArray alloc] initWithObjects:BOXSTRING("dylib"), BOXSTRING("Core"), nil];
[panel setAllowedFileTypes:filetypes];
#if defined(MAC_OS_X_VERSION_10_6)
[panel setMessage:BOXSTRING("Load Core")];
[panel setDirectoryURL:[NSURL fileURLWithPath:startdir]];
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result)
{
[[NSApplication sharedApplication] stopModal];
open_core_handler(panel, result);
}];
[[NSApplication sharedApplication] runModalForWindow:panel];
#else
[panel setTitle:NSLocalizedString(BOXSTRING("Load Core"), BOXSTRING("open panel"))];
[panel setDirectory:startdir];
[panel setCanChooseDirectories:NO];
[panel setCanChooseFiles:YES];
[panel setAllowsMultipleSelection:NO];
[panel setTreatsFilePackagesAsDirectories:NO];
NSInteger result = [panel runModal];
if (result == 1)
open_core_handler(panel, result);
#endif
const ui_browser_window_t *browser = ui_companion_driver_get_browser_window_ptr();
if (browser)
{
ui_browser_window_state_t browser_state;
settings_t *settings = config_get_ptr();
browser_state.filters = strdup("dylib");
browser_state.filters_title = strdup("Core");
browser_state.title = strdup("Load Core");
browser_state.startdir = strdup(settings->directory.libretro);
bool result = browser->open(&browser_state);
open_core_handler(&browser_state, result);
free(browser_state.filters);
free(browser_state.filters_title);
free(browser_state.title);
free(browser_state.startdir);
}
}
- (void)openDocument:(id)sender
{
NSOpenPanel* panel = (NSOpenPanel*)[NSOpenPanel openPanel];
const ui_browser_window_t *browser = ui_companion_driver_get_browser_window_ptr();
settings_t *settings = config_get_ptr();
NSString *startdir = BOXSTRING(settings->directory.menu_content);
if (!startdir.length)
startdir = BOXSTRING("/");
#if defined(MAC_OS_X_VERSION_10_6)
[panel setMessage:BOXSTRING("Load Content")];
[panel setDirectoryURL:[NSURL fileURLWithPath:startdir]];
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result)
{
[[NSApplication sharedApplication] stopModal];
open_document_handler(panel, result);
}];
[[NSApplication sharedApplication] runModalForWindow:panel];
#else
[panel setTitle:NSLocalizedString(BOXSTRING("Load Content"), BOXSTRING("open panel"))];
[panel setDirectory:startdir];
[panel setCanChooseDirectories:NO];
[panel setCanChooseFiles:YES];
[panel setAllowsMultipleSelection:NO];
[panel setTreatsFilePackagesAsDirectories:NO];
NSInteger result = [panel runModal];
if (result == 1)
open_document_handler(panel, result);
#endif
if (browser)
{
ui_browser_window_state_t browser_state = {0};
browser_state.title = strdup("Load Content");
browser_state.startdir = strdup([startdir UTF8String]);
bool result = browser->open(&browser_state);
open_document_handler(&browser_state, result);
free(browser_state.startdir);
free(browser_state.title);
}
}
- (void)unloadingCore
@ -515,20 +490,6 @@ int main(int argc, char *argv[])
return NSApplicationMain(argc, (const char **) argv);
}
void apple_display_alert(const char *message, const char *title)
{
NSAlert* alert = [[NSAlert new] autorelease];
[alert setMessageText:(*title) ? BOXSTRING(title) : BOXSTRING("RetroArch")];
[alert setInformativeText:BOXSTRING(message)];
[alert setAlertStyle:NSInformationalAlertStyle];
[alert beginSheetModalForWindow:((RetroArch_OSX*)[[NSApplication sharedApplication] delegate]).window
modalDelegate:apple_platform
didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:)
contextInfo:nil];
[[NSApplication sharedApplication] runModalForWindow:[alert window]];
}
typedef struct ui_companion_cocoa
{
void *empty;
@ -596,6 +557,9 @@ const ui_companion_driver_t ui_companion_cocoa = {
NULL,
NULL,
NULL,
&ui_browser_window_cocoa,
&ui_msg_window_cocoa,
&ui_window_cocoa,
&ui_application_cocoa,
"cocoa",
};

View File

@ -534,7 +534,8 @@ int main(int argc, char *argv[])
}
}
void apple_display_alert(const char *message, const char *title)
#if 0
static void apple_display_alert(const char *message, const char *title)
{
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:BOXSTRING(title)
message:BOXSTRING(message)
@ -543,6 +544,7 @@ void apple_display_alert(const char *message, const char *title)
otherButtonTitles:nil];
[alert show];
}
#endif
static void apple_rarch_exited(void)
{
@ -687,6 +689,9 @@ const ui_companion_driver_t ui_companion_cocoatouch = {
ui_companion_cocoatouch_notify_refresh,
ui_companion_cocoatouch_msg_queue_push,
ui_companion_cocoatouch_render_messagebox,
&ui_browser_window_null,
&ui_msg_window_null,
&ui_window_null,
&ui_application_null,
"cocoatouch",
};

View File

@ -88,6 +88,9 @@ const ui_companion_driver_t ui_companion_null = {
NULL,
NULL,
NULL,
&ui_browser_window_null,
&ui_msg_window_null,
&ui_window_null,
&ui_application_null,
"null",
};

View File

@ -132,6 +132,9 @@ const ui_companion_driver_t ui_companion_qt = {
NULL,
NULL,
NULL,
&ui_browser_window_null,
&ui_msg_window_null,
&ui_window_null,
&ui_application_null,
"qt",
};

View File

@ -54,7 +54,7 @@
#include "../../gfx/common/gl_common.h"
#include "../../gfx/common/win32_common.h"
#include "win32/ui_win32_window.h"
#include "ui_win32.h"
#define SHADER_DLG_WIDTH 220
#define SHADER_DLG_MIN_HEIGHT 200
@ -729,6 +729,9 @@ const ui_companion_driver_t ui_companion_win32 = {
NULL,
NULL,
NULL,
&ui_browser_window_win32,
&ui_msg_window_win32,
&ui_window_win32,
&ui_application_win32,
"win32",
};

View File

@ -14,8 +14,8 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _WIN32_WINDOW_UI
#define _WIN32_WINDOW_UI
#ifndef _WIN32_UI
#define _WIN32_UI
#include <stdint.h>
#include <stddef.h>
@ -28,10 +28,15 @@
#include <windows.h>
#endif
#include "../../ui_companion_driver.h"
#include "../ui_companion_driver.h"
RETRO_BEGIN_DECLS
typedef struct ui_application_win32
{
void *empty;
} ui_application_win32_t;
typedef struct ui_window_win32
{
HWND hwnd;

View File

@ -0,0 +1,50 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include "../../ui_companion_driver.h"
static bool ui_application_win32_pending_events(void)
{
MSG msg;
return PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
}
static void ui_application_win32_process_events(void)
{
while (ui_application_win32_pending_events())
{
MSG msg;
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage (&msg);
}
}
}
const ui_application_t ui_application_win32 = {
ui_application_win32_pending_events,
ui_application_win32_process_events,
"win32"
};

View File

@ -0,0 +1,40 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include "../../ui_companion_driver.h"
static bool ui_browser_window_win32_open(ui_browser_window_state_t *state)
{
return false;
}
static bool ui_browser_window_win32_save(ui_browser_window_state_t *state)
{
return false;
}
const ui_browser_window_t ui_browser_window_win32 = {
ui_browser_window_win32_open,
ui_browser_window_win32_save,
"win32"
};

View File

@ -0,0 +1,106 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include "../../ui_companion_driver.h"
static enum ui_msg_window_response ui_msg_window_win32_response(ui_msg_window_state *state, UINT response)
{
switch (response)
{
case IDOK:
return UI_MSG_RESPONSE_OK;
case IDCANCEL:
return UI_MSG_RESPONSE_CANCEL;
case IDYES:
return UI_MSG_RESPONSE_YES;
case IDNO:
return UI_MSG_RESPONSE_NO;
default:
break;
}
switch (state->buttons)
{
case UI_MSG_WINDOW_OK:
return UI_MSG_RESPONSE_OK;
case UI_MSG_WINDOW_OKCANCEL:
return UI_MSG_RESPONSE_CANCEL;
case UI_MSG_WINDOW_YESNO:
return UI_MSG_RESPONSE_NO;
case UI_MSG_WINDOW_YESNOCANCEL:
return UI_MSG_RESPONSE_CANCEL;
default:
break;
}
return UI_MSG_RESPONSE_NA;
}
static UINT ui_msg_window_win32_buttons(ui_msg_window_state *state)
{
switch (state->buttons)
{
case UI_MSG_WINDOW_OK:
return MB_OK;
case UI_MSG_WINDOW_OKCANCEL:
return MB_OKCANCEL;
case UI_MSG_WINDOW_YESNO:
return MB_YESNO;
case UI_MSG_WINDOW_YESNOCANCEL:
return MB_YESNOCANCEL;
}
return 0;
}
static enum ui_msg_window_response ui_msg_window_win32_error(ui_msg_window_state *state)
{
UINT flags = MB_ICONERROR | ui_msg_window_win32_buttons(state);
return ui_msg_window_win32_response(state, MessageBoxA(NULL, (LPCSTR)state->text, (LPCSTR)state->title, flags));
}
static enum ui_msg_window_response ui_msg_window_win32_information(ui_msg_window_state *state)
{
UINT flags = MB_ICONINFORMATION | ui_msg_window_win32_buttons(state);
return ui_msg_window_win32_response(state, MessageBoxA(NULL, (LPCSTR)state->text, (LPCSTR)state->title, flags));
}
static enum ui_msg_window_response ui_msg_window_win32_question(ui_msg_window_state *state)
{
UINT flags = MB_ICONQUESTION | ui_msg_window_win32_buttons(state);
return ui_msg_window_win32_response(state, MessageBoxA(NULL, (LPCSTR)state->text, (LPCSTR)state->title, flags));
}
static enum ui_msg_window_response ui_msg_window_win32_warning(ui_msg_window_state *state)
{
UINT flags = MB_ICONWARNING | ui_msg_window_win32_buttons(state);
return ui_msg_window_win32_response(state, MessageBoxA(NULL, (LPCSTR)state->text, (LPCSTR)state->title, flags));
}
const ui_msg_window_t ui_msg_window_win32 = {
ui_msg_window_win32_error,
ui_msg_window_win32_information,
ui_msg_window_win32_question,
ui_msg_window_win32_warning,
"win32"
};

View File

@ -20,6 +20,8 @@
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#ifdef _MSC_VER
#pragma comment( lib, "comctl32" )
#endif
@ -41,7 +43,7 @@
#include <retro_inline.h>
#include <file/file_path.h>
#include "ui_win32_window.h"
#include "../ui_win32.h"
#include "../../ui_companion_driver.h"
#include "../../../driver.h"
@ -75,6 +77,7 @@ static void ui_window_win32_set_title(void *data, char *buf)
static void ui_window_win32_set_droppable(void *data, bool droppable)
{
/* Minimum supported client: Windows XP, minimum supported server: Windows 2000 Server */
ui_window_win32_t *window = (ui_window_win32_t*)data;
DragAcceptFiles(window->hwnd, droppable);
}

View File

@ -170,6 +170,14 @@ void ui_companion_driver_free(void)
ui_companion = NULL;
}
const ui_msg_window_t *ui_companion_driver_get_msg_window_ptr(void)
{
const ui_companion_driver_t *ui = ui_companion_get_ptr();
if (!ui)
return NULL;
return ui->msg_window;
}
const ui_window_t *ui_companion_driver_get_window_ptr(void)
{
const ui_companion_driver_t *ui = ui_companion_get_ptr();
@ -177,3 +185,19 @@ const ui_window_t *ui_companion_driver_get_window_ptr(void)
return NULL;
return ui->window;
}
const ui_browser_window_t *ui_companion_driver_get_browser_window_ptr(void)
{
const ui_companion_driver_t *ui = ui_companion_get_ptr();
if (!ui)
return NULL;
return ui->browser_window;
}
const ui_application_t *ui_companion_driver_get_application_ptr(void)
{
const ui_companion_driver_t *ui = ui_companion_get_ptr();
if (!ui)
return NULL;
return ui->application;
}

View File

@ -31,6 +31,83 @@
RETRO_BEGIN_DECLS
enum ui_msg_window_buttons
{
UI_MSG_WINDOW_OK = 0,
UI_MSG_WINDOW_OKCANCEL,
UI_MSG_WINDOW_YESNO,
UI_MSG_WINDOW_YESNOCANCEL
};
enum ui_msg_window_response
{
UI_MSG_RESPONSE_NA = 0,
UI_MSG_RESPONSE_OK,
UI_MSG_RESPONSE_CANCEL,
UI_MSG_RESPONSE_YES,
UI_MSG_RESPONSE_NO
};
enum ui_msg_window_type
{
UI_MSG_WINDOW_TYPE_ERROR = 0,
UI_MSG_WINDOW_TYPE_INFORMATION,
UI_MSG_WINDOW_TYPE_QUESTION,
UI_MSG_WINDOW_TYPE_WARNING
};
typedef struct ui_msg_window_state
{
enum ui_msg_window_buttons buttons;
char *text;
char *title;
} ui_msg_window_state;
typedef struct ui_browser_window_state
{
struct
{
bool can_choose_directories;
bool can_choose_directories_val;
bool can_choose_files;
bool can_choose_files_val;
bool allows_multiple_selection;
bool allows_multiple_selection_val;
bool treat_file_packages_as_directories;
bool treat_file_packages_as_directories_val;
} capabilities;
void *window;
char *filters;
char *filters_title;
char *startdir;
char *path;
char *title;
char *result;
} ui_browser_window_state_t;
typedef struct ui_browser_window
{
bool (*open)(ui_browser_window_state_t *state);
bool (*save)(ui_browser_window_state_t *state);
const char *ident;
} ui_browser_window_t;
typedef struct ui_msg_window
{
enum ui_msg_window_response (*error )(ui_msg_window_state *state);
enum ui_msg_window_response (*information)(ui_msg_window_state *state);
enum ui_msg_window_response (*question )(ui_msg_window_state *state);
enum ui_msg_window_response (*warning )(ui_msg_window_state *state);
const char *ident;
} ui_msg_window_t;
typedef struct ui_application
{
bool (*pending_events)(void);
void (*process_events)(void);
const char *ident;
} ui_application_t;
typedef struct ui_window
{
void (*destroy)(void *data);
@ -54,14 +131,29 @@ typedef struct ui_companion_driver
void (*notify_refresh)(void *data);
void (*msg_queue_push)(const char *msg, unsigned priority, unsigned duration, bool flush);
void (*render_messagebox)(const char *msg);
const ui_window_t *window;
const ui_browser_window_t *browser_window;
const ui_msg_window_t *msg_window;
const ui_window_t *window;
const ui_application_t *application;
const char *ident;
} ui_companion_driver_t;
extern const ui_browser_window_t ui_browser_window_null;
extern const ui_browser_window_t ui_browser_window_cocoa;
extern const ui_browser_window_t ui_browser_window_win32;
extern const ui_window_t ui_window_null;
extern const ui_window_t ui_window_cocoa;
extern const ui_window_t ui_window_win32;
extern const ui_msg_window_t ui_msg_window_null;
extern const ui_msg_window_t ui_msg_window_win32;
extern const ui_msg_window_t ui_msg_window_cocoa;
extern const ui_application_t ui_application_null;
extern const ui_application_t ui_application_win32;
extern const ui_application_t ui_application_cocoa;
extern const ui_companion_driver_t ui_companion_null;
extern const ui_companion_driver_t ui_companion_cocoa;
extern const ui_companion_driver_t ui_companion_cocoatouch;
@ -109,8 +201,14 @@ void ui_companion_driver_toggle(void);
void ui_companion_driver_free(void);
const ui_msg_window_t *ui_companion_driver_get_msg_window_ptr(void);
const ui_browser_window_t *ui_companion_driver_get_browser_window_ptr(void);
const ui_window_t *ui_companion_driver_get_window_ptr(void);
const ui_application_t *ui_companion_driver_get_application_ptr(void);
RETRO_END_DECLS
#endif