mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-21 07:25:39 -04:00
WindowInfo: Don't clear display when going surfaceless
Fixes panic when a popup occurs when using GLX.
This commit is contained in:
@ -2,6 +2,21 @@
|
||||
#include "common/log.h"
|
||||
Log_SetChannel(WindowInfo);
|
||||
|
||||
void WindowInfo::SetSurfaceless()
|
||||
{
|
||||
type = Type::Surfaceless;
|
||||
window_handle = nullptr;
|
||||
surface_width = 0;
|
||||
surface_height = 0;
|
||||
surface_refresh_rate = 0.0f;
|
||||
surface_scale = 1.0f;
|
||||
surface_format = SurfaceFormat::None;
|
||||
|
||||
#ifdef __APPLE__
|
||||
surface_handle = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
#include "common/windows_headers.h"
|
||||
|
@ -39,5 +39,8 @@ struct WindowInfo
|
||||
void* surface_handle = nullptr;
|
||||
#endif
|
||||
|
||||
// Changes the window to be surfaceless (i.e. no handle/size/etc).
|
||||
void SetSurfaceless();
|
||||
|
||||
static bool QueryRefreshRateForWindow(const WindowInfo& wi, float* refresh_rate);
|
||||
};
|
||||
|
Reference in New Issue
Block a user