mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
disable cursor shadow
This commit is contained in:
parent
a273e86056
commit
860758dc67
@ -68,6 +68,8 @@ init_libwgldisplay() {
|
|||||||
wglGraphicsWindow::make_wglGraphicsWindow);
|
wglGraphicsWindow::make_wglGraphicsWindow);
|
||||||
|
|
||||||
atexit(AtExitFn);
|
atexit(AtExitFn);
|
||||||
|
|
||||||
|
set_global_parameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
// cant use global var cleanly because global var static init executed after init_libwgl(), incorrectly reiniting var
|
// cant use global var cleanly because global var static init executed after init_libwgl(), incorrectly reiniting var
|
||||||
|
@ -190,6 +190,8 @@ void AtExitFn() {
|
|||||||
wgldisplay_cat.spam() << "AtExitFn called\n";
|
wgldisplay_cat.spam() << "AtExitFn called\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
restore_global_parameters();
|
||||||
|
|
||||||
DestroyAllWindows(true);
|
DestroyAllWindows(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1048,7 +1050,7 @@ verify_window_sizes(unsigned int numsizes,unsigned int *dimen) {
|
|||||||
bIsGoodmode=false;
|
bIsGoodmode=false;
|
||||||
} else {
|
} else {
|
||||||
if(_bIsLowVidMemCard) {
|
if(_bIsLowVidMemCard) {
|
||||||
bIsGoodmode=((dwWidth*dwHeight)<=(640*480));
|
bIsGoodmode=((float)(dwWidth*(float)dwHeight)<=(float)(640*480));
|
||||||
} else {
|
} else {
|
||||||
bIsGoodmode = find_acceptable_display_mode(dwWidth,dwHeight,dwFullScreenBitDepth,dm);
|
bIsGoodmode = find_acceptable_display_mode(dwWidth,dwHeight,dwFullScreenBitDepth,dm);
|
||||||
}
|
}
|
||||||
@ -3317,3 +3319,25 @@ extern char *ConvDDErrorToString(const HRESULT &error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Global system parameters we want to modify during our run
|
||||||
|
static int iMouseTrails;
|
||||||
|
static bool bCursorShadowOn;
|
||||||
|
|
||||||
|
void set_global_parameters(void) {
|
||||||
|
// turn off mousetrails and cursor shadow.
|
||||||
|
// cursor shadow causes cursor blink and reduced frame rate due to lack of driver support for
|
||||||
|
// cursor alpha blending
|
||||||
|
|
||||||
|
// this is a win2k/xp only param, could use GetVersionEx to do it just for win2k
|
||||||
|
SystemParametersInfo(SPI_GETCURSORSHADOW,NULL,&bCursorShadowOn,NULL);
|
||||||
|
SystemParametersInfo(SPI_SETCURSORSHADOW,NULL,(PVOID)false,NULL);
|
||||||
|
|
||||||
|
SystemParametersInfo(SPI_GETMOUSETRAILS,NULL,&iMouseTrails,NULL);
|
||||||
|
SystemParametersInfo(SPI_SETMOUSETRAILS,NULL,(PVOID)0,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void restore_global_parameters(void) {
|
||||||
|
SystemParametersInfo(SPI_SETCURSORSHADOW,NULL,(PVOID)bCursorShadowOn,NULL);
|
||||||
|
SystemParametersInfo(SPI_SETMOUSETRAILS,NULL,(PVOID)iMouseTrails,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -163,4 +163,7 @@ private:
|
|||||||
static TypeHandle _type_handle;
|
static TypeHandle _type_handle;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern void set_global_parameters();
|
||||||
|
extern void restore_global_parameters();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user