2022-02-28 01:01:40 +01:00
|
|
|
//===========================================================================//
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
//
|
|
|
|
//===========================================================================//
|
|
|
|
#include "core/stdafx.h"
|
|
|
|
#include "windows/id3dx.h"
|
|
|
|
#include "engine/sys_getmodes.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Purpose: creates the game window, obtains the rect and plays the startup movie.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
bool HCVideoMode_Common__CreateGameWindow(int* pnRect)
|
|
|
|
{
|
2023-01-30 22:08:01 +01:00
|
|
|
g_nWindowRect[0] = pnRect[0];
|
|
|
|
g_nWindowRect[1] = pnRect[1];
|
2022-02-28 01:01:40 +01:00
|
|
|
return CVideoMode_Common__CreateGameWindow(pnRect);
|
|
|
|
}
|
|
|
|
|
2023-01-25 02:26:52 +01:00
|
|
|
void HVideoMode_Common::Attach() const
|
2022-02-28 01:01:40 +01:00
|
|
|
{
|
2023-01-25 02:26:52 +01:00
|
|
|
DetourAttach(&CVideoMode_Common__CreateGameWindow, &HCVideoMode_Common__CreateGameWindow);
|
2022-02-28 01:01:40 +01:00
|
|
|
}
|
|
|
|
|
2023-01-25 02:26:52 +01:00
|
|
|
void HVideoMode_Common::Detach() const
|
2022-02-28 01:01:40 +01:00
|
|
|
{
|
2023-01-25 02:26:52 +01:00
|
|
|
DetourDetach(&CVideoMode_Common__CreateGameWindow, &HCVideoMode_Common__CreateGameWindow);
|
2022-02-28 01:01:40 +01:00
|
|
|
}
|