2015-12-23 08:45:53 -05:00
|
|
|
#include "..\STDInclude.hpp"
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
Dvar::Var Window::NoBorder;
|
|
|
|
|
|
|
|
void __declspec(naked) Window::StyleHookStub()
|
|
|
|
{
|
|
|
|
if (Window::NoBorder.Get<bool>())
|
|
|
|
{
|
|
|
|
__asm mov ebp, WS_VISIBLE | WS_POPUP
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
__asm mov ebp, WS_VISIBLE | WS_SYSMENU | WS_CAPTION
|
|
|
|
}
|
|
|
|
|
|
|
|
__asm retn
|
|
|
|
}
|
|
|
|
|
|
|
|
Window::Window()
|
|
|
|
{
|
|
|
|
// Borderless window
|
2015-12-26 21:56:00 -05:00
|
|
|
Window::NoBorder = Dvar::Register<bool>("r_noborder", true, Game::dvar_flag::DVAR_FLAG_SAVED, "Do not use a border in windowed mode");
|
2015-12-23 08:45:53 -05:00
|
|
|
Utils::Hook(0x507643, Window::StyleHookStub, HOOK_CALL).Install()->Quick();
|
|
|
|
}
|
|
|
|
}
|