mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix last checkin
This commit is contained in:
parent
a1beb2f8a5
commit
2a3c8c2435
@ -25,26 +25,26 @@ wglGraphicsPipe::wglGraphicsPipe(const PipeSpecifier& spec)
|
|||||||
: InteractiveGraphicsPipe(spec)
|
: InteractiveGraphicsPipe(spec)
|
||||||
{
|
{
|
||||||
// Register a standard window class
|
// Register a standard window class
|
||||||
WNDCLASS stdwc;
|
WNDCLASS wc;
|
||||||
HINSTANCE hinstance = GetModuleHandle(NULL);
|
HINSTANCE hinstance = GetModuleHandle(NULL);
|
||||||
|
|
||||||
// Clear before filling in window structure!
|
// Clear before filling in window structure!
|
||||||
memset(&stdwc, 0, sizeof(WNDCLASS));
|
memset(&wc, 0, sizeof(WNDCLASS));
|
||||||
stdwc.style = CS_OWNDC;
|
wc.style = CS_OWNDC;
|
||||||
stdwc.lpfnWndProc = (WNDPROC)static_window_proc;
|
wc.lpfnWndProc = (WNDPROC)static_window_proc;
|
||||||
stdwc.hInstance = hinstance;
|
wc.hInstance = hinstance;
|
||||||
stdwc.hCursor = LoadCursor(NULL, IDC_CROSS);
|
wc.hCursor = LoadCursor(NULL, IDC_CROSS);
|
||||||
stdwc.hbrBackground = NULL;
|
wc.hbrBackground = NULL;
|
||||||
stdwc.lpszMenuName = NULL;
|
wc.lpszMenuName = NULL;
|
||||||
stdwc.lpszClassName = "wglStandard";
|
wc.lpszClassName = "wglStandard";
|
||||||
|
|
||||||
if(!IconFileName.empty()) {
|
if(!IconFileName.empty()) {
|
||||||
stdwc.hIcon = (HICON) LoadImage(NULL, IconFileName.c_str(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE);
|
wc.hIcon = (HICON) LoadImage(NULL, IconFileName.c_str(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE);
|
||||||
} else {
|
} else {
|
||||||
stdwc.hIcon = NULL; // use default app icon
|
wc.hIcon = NULL; // use default app icon
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RegisterClass(&stdwc)) {
|
if (!RegisterClass(&wc)) {
|
||||||
wgldisplay_cat.fatal()
|
wgldisplay_cat.fatal()
|
||||||
<< "wglGraphicsPipe::construct(): could not register standard window "
|
<< "wglGraphicsPipe::construct(): could not register standard window "
|
||||||
<< "class" << endl;
|
<< "class" << endl;
|
||||||
@ -52,20 +52,10 @@ wglGraphicsPipe::wglGraphicsPipe(const PipeSpecifier& spec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Register a fullscreen window class
|
// Register a fullscreen window class
|
||||||
WNDCLASS fswc;
|
wc.style = CS_HREDRAW | CS_VREDRAW;
|
||||||
|
wc.lpszClassName = "wglFullscreen";
|
||||||
|
|
||||||
// Clear before filling in window structure!
|
if (!RegisterClass(&wc)) {
|
||||||
memset(&fswc, 0, sizeof(WNDCLASS));
|
|
||||||
fswc.style = CS_HREDRAW | CS_VREDRAW;
|
|
||||||
fswc.lpfnWndProc = (WNDPROC)static_window_proc;
|
|
||||||
fswc.hInstance = hinstance;
|
|
||||||
fswc.hIcon = NULL;
|
|
||||||
fswc.hCursor = LoadCursor(hinstance, IDC_CROSS);
|
|
||||||
fswc.hbrBackground = NULL;
|
|
||||||
fswc.lpszMenuName = NULL;
|
|
||||||
fswc.lpszClassName = "wglFullscreen";
|
|
||||||
|
|
||||||
if (!RegisterClass(&fswc)) {
|
|
||||||
wgldisplay_cat.fatal()
|
wgldisplay_cat.fatal()
|
||||||
<< "wglGraphicsPipe::construct(): could not register fullscreen window "
|
<< "wglGraphicsPipe::construct(): could not register fullscreen window "
|
||||||
<< "class" << endl;
|
<< "class" << endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user