summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-03-31 09:48:28 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-03-31 09:48:28 +0200
commitc44d434416b783026ef9f71c35b9c979759f000b (patch)
treea05eee0ed7c96d729e48d88e6c5a1c6fa763b909
parent6b264f7e5532f1c26a437ed0dc597649c6331221 (diff)
Changes in order to compile SDL build under VS2013, removed duplicated code, it exists in strconv (nw)
-rw-r--r--src/osd/modules/render/blit13.h2
-rw-r--r--src/osd/modules/render/drawsdl.c4
-rw-r--r--src/osd/sdl/sdlmain.c41
-rw-r--r--src/osd/sdl/window.c2
4 files changed, 5 insertions, 44 deletions
diff --git a/src/osd/modules/render/blit13.h b/src/osd/modules/render/blit13.h
index 3fd229e93da..e394efc744a 100644
--- a/src/osd/modules/render/blit13.h
+++ b/src/osd/modules/render/blit13.h
@@ -51,7 +51,7 @@ inline UINT32 pixel_ycc_to_rgb_pal(const UINT16 *pixel, const rgb_t *palette)
#define FUNC_DEF(source) op(const source &src, const rgb_t *palbase) const
-#define FUNCTOR(name, x...) \
+#define FUNCTOR(name, x) \
template<typename _source, typename _dest> \
struct name { _dest FUNC_DEF(_source) { x } };
diff --git a/src/osd/modules/render/drawsdl.c b/src/osd/modules/render/drawsdl.c
index df979c35911..32753ef79b9 100644
--- a/src/osd/modules/render/drawsdl.c
+++ b/src/osd/modules/render/drawsdl.c
@@ -129,7 +129,7 @@ struct sdl_scale_mode
#if (!SDLMAME_SDL2)
int m_extra_flags; /* Texture/surface flags */
#else
- const char *sdl_scale_mode; /* what to use as a hint ? */
+ const char *sdl_scale_mode_hint; /* what to use as a hint ? */
#endif
int pixel_format; /* Pixel/Overlay format */
void (*yuv_blit)(const UINT16 *bitmap, UINT8 *ptr, const int pitch, const UINT32 *lookup, const int width, const int height);
@@ -435,7 +435,7 @@ int sdl_info::create()
// create renderer
/* set hints ... */
- SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, sm->sdl_scale_mode);
+ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, sm->sdl_scale_mode_hint);
if (video_config.waitvsync)
diff --git a/src/osd/sdl/sdlmain.c b/src/osd/sdl/sdlmain.c
index ac4729166e2..00fc9adcbf8 100644
--- a/src/osd/sdl/sdlmain.c
+++ b/src/osd/sdl/sdlmain.c
@@ -633,44 +633,3 @@ void sdl_osd_interface::init(running_machine &machine)
SDL_EnableUNICODE(SDL_TRUE);
#endif
}
-
-#ifdef SDLMAME_WIN32
-
-//============================================================
-// wstring_from_utf8
-//============================================================
-
-WCHAR *wstring_from_utf8(const char *utf8string)
-{
- int char_count;
- WCHAR *result;
-
- // convert MAME string (UTF-8) to UTF-16
- char_count = MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, NULL, 0);
- result = (WCHAR *)osd_malloc_array(char_count * sizeof(*result));
- if (result != NULL)
- MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, result, char_count);
-
- return result;
-}
-
-
-//============================================================
-// utf8_from_wstring
-//============================================================
-
-char *utf8_from_wstring(const WCHAR *wstring)
-{
- int char_count;
- char *result;
-
- // convert UTF-16 to MAME string (UTF-8)
- char_count = WideCharToMultiByte(CP_UTF8, 0, wstring, -1, NULL, 0, NULL, NULL);
- result = (char *)osd_malloc_array(char_count * sizeof(*result));
- if (result != NULL)
- WideCharToMultiByte(CP_UTF8, 0, wstring, -1, result, char_count, NULL, NULL);
-
- return result;
-}
-
-#endif
diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c
index b41bf3bc7e5..e77fa480bb0 100644
--- a/src/osd/sdl/window.c
+++ b/src/osd/sdl/window.c
@@ -20,7 +20,9 @@
// standard C headers
#include <math.h>
+#ifndef _MSC_VER
#include <unistd.h>
+#endif
// MAME headers