mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Update nemirtingas overlay to latest.
This commit is contained in:
parent
1ad2818e28
commit
04022c005f
15 changed files with 187 additions and 95 deletions
|
|
@ -110,6 +110,8 @@ void OpenGLX_Hook::_PrepareForOverlay(Display* display, GLXDrawable drawable)
|
|||
|
||||
_Display = display;
|
||||
|
||||
X11_Hook::Inst()->SetInitialWindowSize(_Display, (Window)drawable);
|
||||
|
||||
_Initialized = true;
|
||||
OverlayHookReady(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,6 +83,18 @@ void X11_Hook::ResetRenderState()
|
|||
}
|
||||
}
|
||||
|
||||
void X11_Hook::SetInitialWindowSize(Display* display, Window wnd)
|
||||
{
|
||||
unsigned int width, height;
|
||||
Window unused_window;
|
||||
int unused_int;
|
||||
unsigned int unused_unsigned_int;
|
||||
|
||||
XGetGeometry(display, wnd, &unused_window, &unused_int, &unused_int, &width, &height, &unused_unsigned_int, &unused_unsigned_int);
|
||||
|
||||
ImGui::GetIO().DisplaySize = ImVec2((float)width, (float)height);
|
||||
}
|
||||
|
||||
bool X11_Hook::PrepareForOverlay(Display *display, Window wnd)
|
||||
{
|
||||
if(!_Hooked)
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public:
|
|||
virtual ~X11_Hook();
|
||||
|
||||
void ResetRenderState();
|
||||
void SetInitialWindowSize(Display* display, Window wnd);
|
||||
bool PrepareForOverlay(Display *display, Window wnd);
|
||||
|
||||
Window GetGameWnd() const{ return _GameWnd; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue