trunk/src/osd/modules/render/drawsdl.c
| r245334 | r245335 | |
| 129 | 129 | #if (!SDLMAME_SDL2) |
| 130 | 130 | int m_extra_flags; /* Texture/surface flags */ |
| 131 | 131 | #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 ? */ |
| 133 | 133 | #endif |
| 134 | 134 | int pixel_format; /* Pixel/Overlay format */ |
| 135 | 135 | void (*yuv_blit)(const UINT16 *bitmap, UINT8 *ptr, const int pitch, const UINT32 *lookup, const int width, const int height); |
| r245334 | r245335 | |
| 435 | 435 | // create renderer |
| 436 | 436 | |
| 437 | 437 | /* 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); |
| 439 | 439 | |
| 440 | 440 | |
| 441 | 441 | if (video_config.waitvsync) |
trunk/src/osd/sdl/sdlmain.c
| r245334 | r245335 | |
| 633 | 633 | SDL_EnableUNICODE(SDL_TRUE); |
| 634 | 634 | #endif |
| 635 | 635 | } |
| 636 | | |
| 637 | | #ifdef SDLMAME_WIN32 |
| 638 | | |
| 639 | | //============================================================ |
| 640 | | // wstring_from_utf8 |
| 641 | | //============================================================ |
| 642 | | |
| 643 | | WCHAR *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 | | |
| 662 | | char *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 |