mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
Merge branch 'release/1.9.x'
This commit is contained in:
commit
8c259d4a20
@ -65,6 +65,12 @@ ConfigVariableBool request_dxdisplay_information
|
|||||||
"you have a specific need for this information and don't mind "
|
"you have a specific need for this information and don't mind "
|
||||||
"having a slow start-up."));
|
"having a slow start-up."));
|
||||||
|
|
||||||
|
ConfigVariableBool dpi_aware
|
||||||
|
("dpi-aware", true,
|
||||||
|
PRC_DESC("The default behavior is for Panda3D to disable DPI-virtualization "
|
||||||
|
"that is introduced in Windows 8.1. Set this to false if you are "
|
||||||
|
"experiencing problems with this setting."));
|
||||||
|
|
||||||
ConfigVariableBool swapbuffer_framelock
|
ConfigVariableBool swapbuffer_framelock
|
||||||
("swapbuffer-framelock", false,
|
("swapbuffer-framelock", false,
|
||||||
PRC_DESC("Set this true to enable HW swapbuffer frame-lock on 3dlabs cards"));
|
PRC_DESC("Set this true to enable HW swapbuffer frame-lock on 3dlabs cards"));
|
||||||
|
@ -30,6 +30,7 @@ extern ConfigVariableBool ime_composition_w;
|
|||||||
extern ConfigVariableBool ime_aware;
|
extern ConfigVariableBool ime_aware;
|
||||||
extern ConfigVariableBool ime_hide;
|
extern ConfigVariableBool ime_hide;
|
||||||
extern ConfigVariableBool request_dxdisplay_information;
|
extern ConfigVariableBool request_dxdisplay_information;
|
||||||
|
extern ConfigVariableBool dpi_aware;
|
||||||
|
|
||||||
extern EXPCL_PANDAWIN ConfigVariableBool swapbuffer_framelock;
|
extern EXPCL_PANDAWIN ConfigVariableBool swapbuffer_framelock;
|
||||||
|
|
||||||
|
@ -686,16 +686,30 @@ WinGraphicsPipe() {
|
|||||||
// these fns arent defined on win95, so get dynamic ptrs to them
|
// these fns arent defined on win95, so get dynamic ptrs to them
|
||||||
// to avoid ugly DLL loader failures on w95
|
// to avoid ugly DLL loader failures on w95
|
||||||
_pfnTrackMouseEvent = NULL;
|
_pfnTrackMouseEvent = NULL;
|
||||||
|
_pfnSetProcessDPIAware = NULL;
|
||||||
|
|
||||||
_hUser32 = (HINSTANCE)LoadLibrary("user32.dll");
|
_hUser32 = (HINSTANCE)LoadLibrary("user32.dll");
|
||||||
if (_hUser32 != NULL) {
|
if (_hUser32 != NULL) {
|
||||||
_pfnTrackMouseEvent =
|
_pfnTrackMouseEvent =
|
||||||
(PFN_TRACKMOUSEEVENT)GetProcAddress(_hUser32, "TrackMouseEvent");
|
(PFN_TRACKMOUSEEVENT)GetProcAddress(_hUser32, "TrackMouseEvent");
|
||||||
|
|
||||||
|
if (dpi_aware) {
|
||||||
|
_pfnSetProcessDPIAware =
|
||||||
|
(PFN_SETPROCESSDPIAWARE)GetProcAddress(_hUser32, "SetProcessDPIAware");
|
||||||
|
|
||||||
|
if (windisplay_cat.is_debug()) {
|
||||||
|
windisplay_cat.debug() << "Calling SetProcessDPIAware().\n";
|
||||||
|
}
|
||||||
|
_pfnSetProcessDPIAware();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DX9
|
#ifdef HAVE_DX9
|
||||||
// Use D3D to get display info. This is disabled by default as it is slow.
|
// Use D3D to get display info. This is disabled by default as it is slow.
|
||||||
if (request_dxdisplay_information) {
|
if (request_dxdisplay_information) {
|
||||||
|
if (windisplay_cat.is_debug()) {
|
||||||
|
windisplay_cat.debug() << "Using Direct3D 9 to fetch display information.\n";
|
||||||
|
}
|
||||||
DisplaySearchParameters display_search_parameters_dx9;
|
DisplaySearchParameters display_search_parameters_dx9;
|
||||||
int dx9_display_information (DisplaySearchParameters &display_search_parameters_dx9, DisplayInformation *display_information);
|
int dx9_display_information (DisplaySearchParameters &display_search_parameters_dx9, DisplayInformation *display_information);
|
||||||
dx9_display_information(display_search_parameters_dx9, _display_information);
|
dx9_display_information(display_search_parameters_dx9, _display_information);
|
||||||
@ -703,6 +717,9 @@ WinGraphicsPipe() {
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// Use the Win32 API to query the available display modes.
|
// Use the Win32 API to query the available display modes.
|
||||||
|
if (windisplay_cat.is_debug()) {
|
||||||
|
windisplay_cat.debug() << "Using EnumDisplaySettings to fetch display information.\n";
|
||||||
|
}
|
||||||
pvector<DisplayMode> display_modes;
|
pvector<DisplayMode> display_modes;
|
||||||
DEVMODE dm = {0};
|
DEVMODE dm = {0};
|
||||||
dm.dmSize = sizeof(dm);
|
dm.dmSize = sizeof(dm);
|
||||||
|
@ -41,9 +41,13 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
HINSTANCE _hUser32;
|
HINSTANCE _hUser32;
|
||||||
|
|
||||||
typedef BOOL (WINAPI *PFN_TRACKMOUSEEVENT)(LPTRACKMOUSEEVENT);
|
typedef BOOL (WINAPI *PFN_TRACKMOUSEEVENT)(LPTRACKMOUSEEVENT);
|
||||||
PFN_TRACKMOUSEEVENT _pfnTrackMouseEvent;
|
PFN_TRACKMOUSEEVENT _pfnTrackMouseEvent;
|
||||||
|
|
||||||
|
typedef BOOL (WINAPI *PFN_SETPROCESSDPIAWARE)(void);
|
||||||
|
PFN_SETPROCESSDPIAWARE _pfnSetProcessDPIAware;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TypeHandle get_class_type() {
|
static TypeHandle get_class_type() {
|
||||||
return _type_handle;
|
return _type_handle;
|
||||||
|
@ -1272,7 +1272,7 @@ adjust_z_order(WindowProperties::ZOrder last_z_order,
|
|||||||
// have focus now, don't move it to the top; it will get moved
|
// have focus now, don't move it to the top; it will get moved
|
||||||
// the next time we get focus.
|
// the next time we get focus.
|
||||||
) {
|
) {
|
||||||
order = HWND_TOP;
|
order = HWND_NOTOPMOST;
|
||||||
do_change = true;
|
do_change = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user