static D3DPRESENT_PARAMETERS g_PresentationParameters;
-int WINAPI
-WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCmdLine, int nCmdShow)
+int
+main(int argc, char *argv[])
{
HRESULT hr;
+ HINSTANCE hInstance = GetModuleHandle(NULL);
+
WNDCLASSEX wc = {
sizeof(WNDCLASSEX),
CS_CLASSDC,
g_PresentationParameters.BackBufferHeight = WindowHeight;
}
g_PresentationParameters.BackBufferCount = 1;
- g_PresentationParameters.SwapEffect = D3DSWAPEFFECT_FLIP;
+ g_PresentationParameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
if (!Windowed) {
g_PresentationParameters.BackBufferFormat = D3DFMT_X8R8G8B8;
} else {