From 1f23338ca43a7a44239134a787ecaab7d88d2b02 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 9 Apr 2015 05:16:02 +0200 Subject: [PATCH] Move win32_common.c to gfx/common --- Makefile.common | 2 +- gfx/{drivers_wm => common}/win32_common.c | 21 ++++++++++++------- gfx/{drivers_wm => common}/win32_common.h | 0 gfx/d3d/d3d.cpp | 2 +- gfx/d3d/d3d_wrapper.h | 2 +- gfx/drivers_context/d3d_ctx.cpp | 2 +- gfx/drivers_context/wgl_ctx.c | 2 +- gfx/drivers_wm/win32_shader_dlg.c | 2 +- griffin/griffin.c | 2 +- input/drivers_keyboard/keyboard_event_win32.c | 2 +- 10 files changed, 21 insertions(+), 16 deletions(-) rename gfx/{drivers_wm => common}/win32_common.c (97%) rename gfx/{drivers_wm => common}/win32_common.h (100%) diff --git a/Makefile.common b/Makefile.common index 59f2ac614a..dc0e7abdd3 100644 --- a/Makefile.common +++ b/Makefile.common @@ -711,7 +711,7 @@ endif ifneq ($(findstring Win32,$(OS)),) OBJ += media/rarch.o \ input/drivers_keyboard/keyboard_event_win32.o \ - gfx/drivers_wm/win32_common.o \ + gfx/common/win32_common.o \ gfx/drivers_wm/win32_dwm_common.o \ frontend/drivers/platform_win32.o endif diff --git a/gfx/drivers_wm/win32_common.c b/gfx/common/win32_common.c similarity index 97% rename from gfx/drivers_wm/win32_common.c rename to gfx/common/win32_common.c index b1f38ec235..34f04c46c7 100644 --- a/gfx/drivers_wm/win32_common.c +++ b/gfx/common/win32_common.c @@ -13,26 +13,31 @@ * If not, see . */ +#include "../../driver.h" +#include "../../general.h" +#include "win32_common.h" +#include + +#if !defined(_XBOX) && defined(_WIN32) + #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 //_WIN32_WINNT_WIN2K #endif -#include "../../driver.h" -#include "../../general.h" -#include "win32_common.h" #include #include -#include - -#if !defined(_XBOX) && defined(_WIN32) #include "../../retroarch.h" #ifdef HAVE_OPENGL #include "win32_shader_dlg.h" #endif -static bool win32_browser(HWND owner, char *filename, const char *extensions, - const char *title, const char *initial_dir) +static bool win32_browser( + HWND owner, + char *filename, + const char *extensions, + const char *title, + const char *initial_dir) { OPENFILENAME ofn; diff --git a/gfx/drivers_wm/win32_common.h b/gfx/common/win32_common.h similarity index 100% rename from gfx/drivers_wm/win32_common.h rename to gfx/common/win32_common.h diff --git a/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index 952f50104c..acc13ba6e7 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -26,8 +26,8 @@ #include "../../runloop.h" #include "render_chain_driver.h" +#include "../common/win32_common.h" #ifndef _XBOX -#include "../drivers_wm/win32_common.h" #include "../drivers_wm/win32_dwm_common.h" #define HAVE_MONITOR diff --git a/gfx/d3d/d3d_wrapper.h b/gfx/d3d/d3d_wrapper.h index 5012cf6db7..a34dd23cd4 100644 --- a/gfx/d3d/d3d_wrapper.h +++ b/gfx/d3d/d3d_wrapper.h @@ -17,7 +17,7 @@ #ifndef _D3D_WRAPPER_H #define _D3D_WRAPPER_H -#include "../drivers_wm/win32_common.h" +#include "../common/win32_common.h" #include "d3d_defines.h" void d3d_swap(void *data, LPDIRECT3DDEVICE dev); diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index db34f6b3d4..65a1b5bb2b 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -16,7 +16,7 @@ */ #include "../d3d/d3d.h" -#include "../drivers_wm/win32_common.h" +#include "../common/win32_common.h" #include "../../runloop.h" #include "../video_monitor.h" diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c index 6a1a4ec3b1..ba38d85df5 100644 --- a/gfx/drivers_context/wgl_ctx.c +++ b/gfx/drivers_context/wgl_ctx.c @@ -26,7 +26,7 @@ #include "../video_context_driver.h" #include "../drivers/gl_common.h" #include "../video_monitor.h" -#include "../drivers_wm/win32_common.h" +#include "../common/win32_common.h" #include "../drivers_wm/win32_shader_dlg.h" #include #include diff --git a/gfx/drivers_wm/win32_shader_dlg.c b/gfx/drivers_wm/win32_shader_dlg.c index f59cedb779..2a4460e6ae 100644 --- a/gfx/drivers_wm/win32_shader_dlg.c +++ b/gfx/drivers_wm/win32_shader_dlg.c @@ -30,7 +30,7 @@ #include "../video_context_driver.h" #include "../drivers/gl_common.h" #include "../video_monitor.h" -#include "win32_common.h" +#include "../common/win32_common.h" #include "win32_shader_dlg.h" #include #include diff --git a/griffin/griffin.c b/griffin/griffin.c index a1a253f32a..f0a930b4e1 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -87,7 +87,7 @@ CHEATS UI COMMON CONTEXT ============================================================ */ #if defined(_WIN32) && !defined(_XBOX) -#include "../gfx/drivers_wm/win32_common.c" +#include "../gfx/common/win32_common.c" #include "../gfx/drivers_wm/win32_dwm_common.c" #endif diff --git a/input/drivers_keyboard/keyboard_event_win32.c b/input/drivers_keyboard/keyboard_event_win32.c index 2b1e2674ec..3c3125ff7a 100644 --- a/input/drivers_keyboard/keyboard_event_win32.c +++ b/input/drivers_keyboard/keyboard_event_win32.c @@ -16,7 +16,7 @@ #include "../../general.h" #include "../keyboard_line.h" -#include "../../gfx/drivers_wm/win32_common.h" +#include "../../gfx/common/win32_common.h" #include "../input_common.h" #include "../input_keymaps.h"