mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
9565d99fab
11
direct/src/dist/FreezeTool.py
vendored
11
direct/src/dist/FreezeTool.py
vendored
@ -2372,6 +2372,17 @@ class PandaModuleFinder(modulefinder.ModuleFinder):
|
|||||||
|
|
||||||
path = self.path
|
path = self.path
|
||||||
|
|
||||||
|
if fullname == 'distutils' and hasattr(sys, 'real_prefix'):
|
||||||
|
# The PyPI version of virtualenv inserts a special version of
|
||||||
|
# distutils that does some bizarre stuff that won't work in our
|
||||||
|
# deployed application. Force it to find the regular one.
|
||||||
|
try:
|
||||||
|
fp, fn, stuff = self.find_module('opcode')
|
||||||
|
if fn:
|
||||||
|
path = [os.path.dirname(fn)] + path
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
# Look for the module on the search path.
|
# Look for the module on the search path.
|
||||||
for dir_path in path:
|
for dir_path in path:
|
||||||
basename = os.path.join(dir_path, name.split('.')[-1])
|
basename = os.path.join(dir_path, name.split('.')[-1])
|
||||||
|
@ -3049,6 +3049,10 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
|
|
||||||
init_app_for_gui()
|
init_app_for_gui()
|
||||||
|
|
||||||
|
# Disable the Windows message loop, since Tcl wants to handle this all
|
||||||
|
# on its own.
|
||||||
|
ConfigVariableBool('disable-message-loop', False).value = True
|
||||||
|
|
||||||
if ConfigVariableBool('tk-main-loop', True):
|
if ConfigVariableBool('tk-main-loop', True):
|
||||||
# Put Tkinter in charge of the main loop. It really
|
# Put Tkinter in charge of the main loop. It really
|
||||||
# seems to like this better; the GUI otherwise becomes
|
# seems to like this better; the GUI otherwise becomes
|
||||||
|
@ -27,16 +27,18 @@ typedef unsigned long ulong;
|
|||||||
typedef unsigned short ushort;
|
typedef unsigned short ushort;
|
||||||
typedef unsigned char uchar;
|
typedef unsigned char uchar;
|
||||||
|
|
||||||
inline namespace std {
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
typedef unsigned long long size_t;
|
#define __SIZE_TYPE__ unsigned long long
|
||||||
typedef long long ssize_t;
|
#define __PTRDIFF_TYPE__ long long
|
||||||
typedef long long ptrdiff_t;
|
|
||||||
#else
|
#else
|
||||||
typedef unsigned long size_t;
|
#define __SIZE_TYPE__ unsigned long
|
||||||
typedef long ssize_t;
|
#define __PTRDIFF_TYPE__ long
|
||||||
typedef long ptrdiff_t;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
inline namespace std {
|
||||||
|
typedef __SIZE_TYPE__ size_t;
|
||||||
|
typedef __PTRDIFF_TYPE__ ssize_t;
|
||||||
|
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct timeval;
|
struct timeval;
|
||||||
|
@ -614,8 +614,11 @@ if (COMPILER == "MSVC"):
|
|||||||
suffix = "-2_2"
|
suffix = "-2_2"
|
||||||
elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_3.lib"):
|
elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_3.lib"):
|
||||||
suffix = "-2_3"
|
suffix = "-2_3"
|
||||||
|
elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_4.lib"):
|
||||||
|
suffix = "-2_4"
|
||||||
|
LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Imath" + suffix + ".lib")
|
||||||
if os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + "_s.lib"):
|
if os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + "_s.lib"):
|
||||||
suffix += "_s"
|
suffix += "_s" # _s suffix observed for OpenEXR 2.3 only so far
|
||||||
LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + ".lib")
|
LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + ".lib")
|
||||||
LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmThread" + suffix + ".lib")
|
LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmThread" + suffix + ".lib")
|
||||||
LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Iex" + suffix + ".lib")
|
LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Iex" + suffix + ".lib")
|
||||||
|
@ -2479,6 +2479,8 @@ def SdkLocateAndroid():
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Allow ANDROID_API/ANDROID_ABI to be used in makepanda.py.
|
# Allow ANDROID_API/ANDROID_ABI to be used in makepanda.py.
|
||||||
|
if ANDROID_API is None:
|
||||||
|
SetTarget('android')
|
||||||
api = ANDROID_API
|
api = ANDROID_API
|
||||||
SDK["ANDROID_API"] = api
|
SDK["ANDROID_API"] = api
|
||||||
|
|
||||||
|
@ -551,6 +551,11 @@ open_window() {
|
|||||||
_parent_window_handle->attach_child(_window_handle);
|
_parent_window_handle->attach_child(_window_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always disable application HiDPI support, Cocoa will do the eventual upscaling for us.
|
||||||
|
// Note: setWantsBestResolutionOpenGLSurface method is supported from MacOS 10.7 onwards
|
||||||
|
if ([_view respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) {
|
||||||
|
[_view setWantsBestResolutionOpenGLSurface:NO];
|
||||||
|
}
|
||||||
if (_properties.has_icon_filename()) {
|
if (_properties.has_icon_filename()) {
|
||||||
NSImage *image = load_image(_properties.get_icon_filename());
|
NSImage *image = load_image(_properties.get_icon_filename());
|
||||||
if (image != nil) {
|
if (image != nil) {
|
||||||
|
@ -116,12 +116,14 @@ IOKitInputDevice(IOHIDDeviceRef device) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
CFArrayRef elements = IOHIDDeviceCopyMatchingElements(device, nullptr, 0);
|
CFArrayRef elements = IOHIDDeviceCopyMatchingElements(device, nullptr, 0);
|
||||||
CFIndex count = CFArrayGetCount(elements);
|
if (elements) {
|
||||||
for (CFIndex i = 0; i < count; ++i) {
|
CFIndex count = CFArrayGetCount(elements);
|
||||||
IOHIDElementRef element = (IOHIDElementRef)CFArrayGetValueAtIndex(elements, i);
|
for (CFIndex i = 0; i < count; ++i) {
|
||||||
parse_element(element);
|
IOHIDElementRef element = (IOHIDElementRef)CFArrayGetValueAtIndex(elements, i);
|
||||||
|
parse_element(element);
|
||||||
|
}
|
||||||
|
CFRelease(elements);
|
||||||
}
|
}
|
||||||
CFRelease(elements);
|
|
||||||
|
|
||||||
if (_hat_element != nullptr) {
|
if (_hat_element != nullptr) {
|
||||||
_hat_left_button = (int)_buttons.size();
|
_hat_left_button = (int)_buttons.size();
|
||||||
|
@ -91,6 +91,13 @@ ConfigVariableBool paste_emit_keystrokes
|
|||||||
PRC_DESC("Handle paste events (Ctrl-V) as separate keystroke events for each "
|
PRC_DESC("Handle paste events (Ctrl-V) as separate keystroke events for each "
|
||||||
"pasted character."));
|
"pasted character."));
|
||||||
|
|
||||||
|
ConfigVariableBool disable_message_loop
|
||||||
|
("disable-message-loop", false,
|
||||||
|
PRC_DESC("If this is false, Panda will process messages from the Windows "
|
||||||
|
"message loop, which is required for normal operation. You may set "
|
||||||
|
"this to true if some other UI framework (such as Tcl/Tk) needs "
|
||||||
|
"exclusive ownership of the message loop."));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the library. This must be called at least once before any of
|
* Initializes the library. This must be called at least once before any of
|
||||||
* the functions or classes in this library can be used. Normally it will be
|
* the functions or classes in this library can be used. Normally it will be
|
||||||
|
@ -32,6 +32,7 @@ extern ConfigVariableBool request_dxdisplay_information;
|
|||||||
extern ConfigVariableBool dpi_aware;
|
extern ConfigVariableBool dpi_aware;
|
||||||
extern ConfigVariableBool dpi_window_resize;
|
extern ConfigVariableBool dpi_window_resize;
|
||||||
extern ConfigVariableBool paste_emit_keystrokes;
|
extern ConfigVariableBool paste_emit_keystrokes;
|
||||||
|
extern ConfigVariableBool disable_message_loop;
|
||||||
|
|
||||||
extern EXPCL_PANDAWIN ConfigVariableBool swapbuffer_framelock;
|
extern EXPCL_PANDAWIN ConfigVariableBool swapbuffer_framelock;
|
||||||
|
|
||||||
|
@ -258,10 +258,12 @@ process_events() {
|
|||||||
|
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
// Handle all the messages on the queue in a row. Some of these might be
|
if (!disable_message_loop) {
|
||||||
// for another window, but they will get dispatched appropriately.
|
// Handle all the messages on the queue in a row. Some of these might be
|
||||||
while (PeekMessage(&msg, nullptr, 0, 0, PM_NOREMOVE)) {
|
// for another window, but they will get dispatched appropriately.
|
||||||
process_1_event();
|
while (PeekMessage(&msg, nullptr, 0, 0, PM_NOREMOVE)) {
|
||||||
|
process_1_event();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user