mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
SDL: more attempts (nw)
This commit is contained in:
parent
5191d3e9c7
commit
1527f5ca82
@ -26,6 +26,11 @@
|
||||
|
||||
#ifdef SDLMAME_WIN32
|
||||
#include "../../sdl/osdsdl.h"
|
||||
#if (SDLMAME_SDL2)
|
||||
#include <SDL2/SDL_syswm.h>
|
||||
#else
|
||||
#include <SDL/SDL_syswm.h>
|
||||
#endif
|
||||
#else
|
||||
#include "winmain.h"
|
||||
#include "window.h"
|
||||
@ -239,8 +244,11 @@ HRESULT sound_direct_sound::dsound_init()
|
||||
}
|
||||
|
||||
// set the cooperative level
|
||||
#ifndef SDLMAME_WIN32
|
||||
result = IDirectSound_SetCooperativeLevel(dsound, (HWND *)sdl_window_list->windows_hwnd, DSSCL_PRIORITY);
|
||||
#ifdef SDLMAME_WIN32
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(&wminfo.version);
|
||||
SDL_GetWindowWMInfo(sdl_window_list->sdl_window, &wminfo);
|
||||
result = IDirectSound_SetCooperativeLevel(dsound, wminfo.win.window, DSSCL_PRIORITY);
|
||||
#else
|
||||
result = IDirectSound_SetCooperativeLevel(dsound, win_window_list->m_hwnd, DSSCL_PRIORITY);
|
||||
#endif
|
||||
|
@ -554,13 +554,6 @@ static int drawsdl2_window_create(sdl_window_info *window, int width, int height
|
||||
window->sdl_window = SDL_CreateWindow(window->title, SDL_WINDOWPOS_UNDEFINED_DISPLAY(window->monitor->handle), SDL_WINDOWPOS_UNDEFINED,
|
||||
width, height, sdl->extra_flags);
|
||||
|
||||
#if SDLMAME_WIN32
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(wminfo.version);
|
||||
SDL_GetWindowWMInfo(window->sdl_window, &wminfo);
|
||||
window->windows_hwnd = (void *)wminfo.win.info;
|
||||
#endif
|
||||
|
||||
if (window->fullscreen && video_config.switchres)
|
||||
{
|
||||
SDL_DisplayMode mode;
|
||||
|
@ -519,13 +519,6 @@ static int drawogl_window_create(sdl_window_info *window, int width, int height)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if SDLMAME_WIN32
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(wminfo.version);
|
||||
SDL_GetWindowWMInfo(window->sdl_window, &wminfo);
|
||||
window->windows_hwnd = (void *)wminfo.win.info;
|
||||
#endif
|
||||
|
||||
if (window->fullscreen && video_config.switchres)
|
||||
{
|
||||
SDL_DisplayMode mode;
|
||||
|
@ -409,13 +409,6 @@ static int drawsdl_window_create(sdl_window_info *window, int width, int height)
|
||||
window->sdl_window = SDL_CreateWindow(window->title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||
width, height, sdl->extra_flags);
|
||||
|
||||
#if SDLMAME_WIN32
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(wminfo.version);
|
||||
SDL_GetWindowWMInfo(window->sdl_window, &wminfo);
|
||||
window->windows_hwnd = (void *)wminfo.win.info;
|
||||
#endif
|
||||
|
||||
if (window->fullscreen && video_config.switchres)
|
||||
{
|
||||
SDL_DisplayMode mode;
|
||||
|
Loading…
Reference in New Issue
Block a user