More appropriate renaming.

This commit is contained in:
Themaister 2011-08-07 21:15:50 +02:00
parent 7425e1f879
commit fc2a39cd58
3 changed files with 15 additions and 7 deletions

View File

@ -63,11 +63,8 @@ bool gfx_window_title(char *buf, size_t size)
#ifdef _WIN32
#include <windows.h>
#include "dynamic.h"
void gfx_set_composition(void)
void gfx_set_dwm(void)
{
if (!g_settings.video.disable_composition)
return;
static bool inited = false;
if (inited)
return;
@ -76,10 +73,20 @@ void gfx_set_composition(void)
dylib_t lib = dylib_load("dwmapi.dll");
if (!lib)
{
SSNES_ERR("Did not find dwmapi.dll");
SSNES_LOG("Did not find dwmapi.dll");
return;
}
HRESULT (WINAPI *mmcss)(BOOL) = (HRESULT (WINAPI*)(BOOL))dylib_proc(lib, "DwmEnableMMCSS");
if (mmcss)
{
SSNES_LOG("Setting multimedia scheduling for DWM.\n");
mmcss(TRUE);
}
if (!g_settings.video.disable_composition)
return;
HRESULT (WINAPI *composition_enable)(UINT) = (HRESULT (WINAPI*)(UINT))dylib_proc(lib, "DwmEnableComposition");
if (!composition_enable)
{
@ -94,5 +101,6 @@ void gfx_set_composition(void)
dylib_close(lib);
}
#endif

View File

@ -25,7 +25,7 @@ bool gfx_window_title(char *buf, size_t size);
void gfx_window_title_reset(void);
#ifdef _WIN32
void gfx_set_composition(void);
void gfx_set_dwm(void);
#endif
#endif

View File

@ -1037,7 +1037,7 @@ static void gl_set_nonblock_state(void *data, bool state)
static void* gl_init(const video_info_t *video, const input_driver_t **input, void **input_data)
{
#ifdef _WIN32
gfx_set_composition();
gfx_set_dwm();
#endif
if (SDL_Init(SDL_INIT_VIDEO) < 0)