Previous 199869 Revisions Next

r36823 Tuesday 31st March, 2015 at 07:48:28 UTC by Miodrag Milanović
Changes in order to compile SDL build under VS2013, removed duplicated code, it exists in strconv (nw)
[src/osd/modules/render]blit13.h drawsdl.c
[src/osd/sdl]sdlmain.c window.c

trunk/src/osd/modules/render/blit13.h
r245334r245335
5151
5252
5353#define FUNC_DEF(source) op(const source &src, const rgb_t *palbase) const
54#define FUNCTOR(name, x...) \
54#define FUNCTOR(name, x) \
5555   template<typename _source, typename _dest> \
5656   struct name { _dest FUNC_DEF(_source) { x } };
5757
trunk/src/osd/modules/render/drawsdl.c
r245334r245335
129129#if (!SDLMAME_SDL2)
130130   int             m_extra_flags;        /* Texture/surface flags */
131131#else
132   const char      *sdl_scale_mode;        /* what to use as a hint ? */
132   const char      *sdl_scale_mode_hint;        /* what to use as a hint ? */
133133#endif
134134   int             pixel_format;       /* Pixel/Overlay format  */
135135   void            (*yuv_blit)(const UINT16 *bitmap, UINT8 *ptr, const int pitch, const UINT32 *lookup, const int width, const int height);
r245334r245335
435435   // create renderer
436436
437437   /* set hints ... */
438   SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, sm->sdl_scale_mode);
438   SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, sm->sdl_scale_mode_hint);
439439
440440
441441   if (video_config.waitvsync)
trunk/src/osd/sdl/sdlmain.c
r245334r245335
633633   SDL_EnableUNICODE(SDL_TRUE);
634634#endif
635635}
636
637#ifdef SDLMAME_WIN32
638
639//============================================================
640//  wstring_from_utf8
641//============================================================
642
643WCHAR *wstring_from_utf8(const char *utf8string)
644{
645   int char_count;
646   WCHAR *result;
647
648   // convert MAME string (UTF-8) to UTF-16
649   char_count = MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, NULL, 0);
650   result = (WCHAR *)osd_malloc_array(char_count * sizeof(*result));
651   if (result != NULL)
652      MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, result, char_count);
653
654   return result;
655}
656
657
658//============================================================
659//  utf8_from_wstring
660//============================================================
661
662char *utf8_from_wstring(const WCHAR *wstring)
663{
664   int char_count;
665   char *result;
666
667   // convert UTF-16 to MAME string (UTF-8)
668   char_count = WideCharToMultiByte(CP_UTF8, 0, wstring, -1, NULL, 0, NULL, NULL);
669   result = (char *)osd_malloc_array(char_count * sizeof(*result));
670   if (result != NULL)
671      WideCharToMultiByte(CP_UTF8, 0, wstring, -1, result, char_count, NULL, NULL);
672
673   return result;
674}
675
676#endif
trunk/src/osd/sdl/window.c
r245334r245335
2020
2121// standard C headers
2222#include <math.h>
23#ifndef _MSC_VER
2324#include <unistd.h>
25#endif
2426
2527// MAME headers
2628


Previous 199869 Revisions Next


© 1997-2024 The MAME Team