svn path=/trunk/boinc/; revision=12721

This commit is contained in:
David Anderson 2007-05-23 03:56:49 +00:00
parent 2fcd2cb7d5
commit 273ad2914b
1 changed files with 15 additions and 11 deletions

View File

@ -87,7 +87,10 @@ void SetupPixelFormat(HDC hDC) {
nPixelFormat = ChoosePixelFormat(hDC, &pfd);
// This set pixel format to device context.
SetPixelFormat(hDC, nPixelFormat, &pfd);
BOOL flag = SetPixelFormat(hDC, nPixelFormat, &pfd);
if (!flag) {
DWORD x = GetLastError();
}
}
static void make_window() {
@ -133,6 +136,7 @@ static void make_window() {
hRC = wglCreateContext(hDC);
if (hRC == 0) {
DWORD x = GetLastError();
ReleaseDC(hWnd, hDC);
return;
}
@ -319,6 +323,7 @@ void win_graphics_event_loop() {
reg_win_class();
gfx_timer_id = SetTimer(NULL, 1, 30, (TIMERPROC)&timer_handler);
make_window();
while (1) {
if (GetMessage(&msg,NULL,0,0)) {
TranslateMessage(&msg);
@ -336,17 +341,16 @@ void boinc_graphics(int argc, char** argv) {
fullscreen = true;
}
}
make_window();
win_graphics_event_loop();
}
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode) {
LPSTR command_line;
char* argv[100];
int argc;
command_line = GetCommandLine();
argc = parse_command_line( command_line, argv );
boinc_graphics(argc, argv);
}
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode) {
LPSTR command_line;
char* argv[100];
int argc;
command_line = GetCommandLine();
argc = parse_command_line( command_line, argv );
boinc_graphics(argc, argv);
}