Override alt-enter behavior, use borderless fullscreen instead of exclusive fullscreen. This should fix the game breaking when bringing up the open file dialog in fullscreen.

(Note that this doesn't handle resolution changes yet)
This commit is contained in:
elasota
2020-04-18 00:18:20 -04:00
parent 0335dd7786
commit c3f3fb4621
19 changed files with 322 additions and 64 deletions

View File

@@ -3,6 +3,8 @@
#include "EGpDisplayDriverType.h"
#include "GpDisplayDriverTickStatus.h"
#include <stdint.h>
struct IGpDisplayDriver;
struct IGpFiber;
struct IGpVOSEventQueue;
@@ -11,7 +13,7 @@ struct GpDisplayDriverProperties
{
typedef GpDisplayDriverTickStatus_t (*TickFunc_t)(void *context, IGpFiber *vosFiber);
typedef void(*RenderFunc_t)(void *context);
typedef bool(*AdjustRequestedResolutionFunc_t)(void *context, unsigned int &width, unsigned int &height);
typedef bool(*AdjustRequestedResolutionFunc_t)(void *context, uint32_t &physicalWidth, uint32_t &physicalHeight, uint32_t &virtualWidth, uint32_t &virtualheight, float &pixelScaleX, float &pixelScaleY);
EGpDisplayDriverType m_type;

View File

@@ -21,9 +21,10 @@ struct GpWindowsGlobals
HINSTANCE m_hPrevInstance;
LPCSTR m_cmdLine;
LPCWSTR m_baseDir;
HWND m_hwnd;
int m_nCmdShow;
IGpFiber *(*m_createFiberFunc)(LPVOID fiber);
IGpCursor_Win32 *(*m_loadCursorFunc)(const wchar_t *path);
void (*m_translateWindowsMessageFunc)(const MSG *msg, IGpVOSEventQueue *eventQueue);
void (*m_translateWindowsMessageFunc)(const MSG *msg, IGpVOSEventQueue *eventQueue, float pixelScaleX, float pixelScaleY);
};

View File

@@ -25,4 +25,6 @@ public:
virtual void UpdatePalette(const void *paletteData) = 0;
virtual void SetBackgroundColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a) = 0;
virtual void RequestToggleFullScreen(uint32_t timestamp) = 0;
};