Commit Graph

232 Commits

Author SHA1 Message Date
rdb 8b241b8c18 windisplay: fix issues with losing mouse cursor confinement
Fixes #727
Fixes #729
2019-09-06 15:36:36 +02:00
rdb 0568312324 windisplay: add config var to disable Ctrl+V behaviour
Fixes #512
2019-05-03 19:41:27 +02:00
rdb 08c686ba18 windisplay: fix issues with runtime fullscreen switching 2019-03-08 11:14:56 +01:00
rdb 729a2364bc windisplay: remove unused WHQL stuff 2018-12-23 16:25:29 +01:00
Younguk Kim ad8a6b4a88 display: fix pointer casting in get_pointer() 2018-12-02 14:44:40 +09:00
rdb 585ba2d647 Prepare input API for multipointer support 2018-11-30 20:54:37 +01:00
rdb 26fcf131c9 Merge branch 'master' into input-overhaul 2018-11-25 17:10:31 +01:00
Sam Edwards a9dfd8352e general: Distinguish local/system includes
This changes includes so that local includes are consistently
#include "localFile.h"
while system and third-party includes are consistently
#include <systemFile.h>

This commit mostly converts the former to the latter; the two
exceptions are in android_main.cxx and fmodAudioSound.h, where
the reverse was necessary.
2018-11-10 18:00:10 -07:00
rdb 70bfe21a63 Merge branch 'master' into input-overhaul 2018-11-06 22:10:39 +01:00
Sam Edwards a246acc640 windisplay: Undefine Configure before including d3d9.h
This is for consistency with fbbc5bb9e6 which introduced the
same `#undef Configure` in dxgsg9. This prevents dtool's own
Configure() macro from conflicting with the declaration of
D3D9's Configure function in d3d9.h.
2018-11-01 21:52:56 -06:00
rdb 357b6d3093 Merge branch 'master' into input-overhaul 2018-10-29 23:40:46 +01:00
rdb b569875bf9 windisplay: fix window size changing when switching undecorated 2018-10-16 16:31:46 +02:00
Sam Edwards 6f62396373 general: Resolve a few compiler warnings
- display: GraphicsWindowProc should have a virtual destructor,
           as it's meant to be subclassed.

- express: set_matrix_view helper should always fail an assert
           when 'size' is wrong, even on release builds.

- express: Fix filename capitalization on some #includes.
           They're normally Windows-only, where case doesn't
           matter, but it's better to be consistent.

- gobj: Fix typo.

- particlesystem: Remove BaseParticle::_last_position.
                  Last position is tracked by PhysicsObject now.

- windisplay: Heed warnings about casting bool to (PVOID).
              Also, per MSDN docs, SPI_SETMOUSETRAILS uses the
              uiParam argument and ignores pvParam, so pass the
              _saved_mouse_trails value in that way.
2018-10-12 15:37:40 -06:00
rdb 7bd8cbdeb6 windisplay: allow changing undecorated/fixed_size after window open
Fixes #405
2018-10-08 23:20:04 +02:00
rdb e30b597926 Merge branch 'master' into input-overhaul 2018-09-16 12:28:22 +02:00
Sam Edwards 4695557a5d general: Don't require BUILDING_* for static builds 2018-08-31 23:54:32 -06:00
rdb 1d6c3f6486 Merge branch 'master' into input-overhaul 2018-08-26 19:03:21 +02:00
rdb 835a895c51 windisplay: don't adjust in_window during get_pointer
This restores the old behaviour from before 29a08932ea, which makes in_window true during pointer capture (ie. click-and-drag) even if the cursor leaves the window.

X11 behaviour is already not to adjust in_window.

Fixes #363
2018-07-07 22:55:45 +02:00
rdb 234fd675b1 Merge branch 'master' into input-overhaul 2018-06-23 23:24:09 +02:00
rdb 29a08932ea display: improve mouselook smoothness significantly, esp if low FPS
This problem occurs when movePointer is used to reset the mouse back to the center every frame, a very common way to implement mouselook on Windows (which has no relative mouse mode).  Any movement between the last event loop run and the call to movePointer is destroyed, resulting in quite choppy mouselook in most implementations.

The solution is for getPointer to always return the latest mouse cursor position.  This goes a long way but is not 100% perfect; see the discussion in #359 for other solutions.

Fixes #359
2018-06-22 23:58:56 +02:00
Sam Edwards b2bfb31114 general: Remove `using std::*` from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
Sam Edwards bc596797a3 general: Resolve some warnings unique to Windows 2018-06-10 02:25:10 -06:00
rdb ba2de46beb Merge branch 'master' into input-overhaul 2018-06-08 15:23:47 +02:00
Sam Edwards 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
Sam Edwards 92d2f5e195 general: Don't use NULL where not appropriate 2018-06-03 16:31:01 -06:00
rdb e0245d2777 First step towards eliminating `using namespace std;` (#335) 2018-06-03 20:32:23 +02:00
Sam Edwards 159b43e563 general: Address a few more compiler warnings 2018-06-01 02:54:13 -06:00
Sam Edwards 52e7c952b3 putil: Rename config_util to config_putil 2018-05-14 02:36:42 -06:00
Sam Edwards 9dd37e9dbc general: Add guards to ensure proper BUILDING_ macros defined
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
2018-03-25 13:17:52 -06:00
rdb 9d2e1f92cb input: fix for Windows compilation, reenable raw input 2017-12-17 16:33:23 +01:00
rdb 8e6cf2a60b Merge branch 'master' into input-overhaul 2017-12-17 13:04:15 +01:00
rdb 019df482d6 windisplay: fix origin not changing upon window being dragged 2017-09-19 19:16:48 +02:00
rdb dcb793aed4 Clean up cpuid code, make selection of cpu/mem info available on Linux, macOS and FreeBSD 2017-02-09 22:56:37 +01:00
rdb 8434914ab6 Merge branch 'master' into input-overhaul 2016-12-28 17:26:58 +01:00
rdb ab5b5e7e74 Merge branch 'release/1.9.x' 2016-12-25 22:47:22 +01:00
rdb 4393455eba Fix get_keyboard_map on Czech (and other) layouts
Now reports proper Unicode name, and doesn't omit keys that don't have a recognised mapping by Panda
https://bugs.launchpad.net/panda3d/+bug/1652145
2016-12-25 16:12:54 +01:00
rdb b217752e16 Merge remote-tracking branch 'origin/release/1.9.x' 2016-12-07 23:03:16 +01:00
rdb 83d54bcdaf Try to preserve refresh rate when switching display mode on Windows 2016-12-07 22:57:53 +01:00
rdb 6344c05b18 Clean up dynamic loading of Win32 funcs, remove makepanda touchinput setting, remove checks for pre-WinXP 2016-12-05 17:21:09 -05:00
rdb b98d3c06ee Merge branch 'master' into input-overhaul 2016-06-24 10:51:41 +02:00
rdb 18874fa151 Replace PN_int/uint types with stdint.h types, since all compilers we support have them.
Plus, we already had code that relied on them being available anyway.
2016-05-11 00:27:58 +02:00
rdb 1cc79633c1 Merge branch 'master' into input-overhaul
Conflicts:
	panda/src/device/buttonNode.cxx
	panda/src/device/clientAnalogDevice.I
	panda/src/device/clientAnalogDevice.cxx
	panda/src/device/clientButtonDevice.I
	panda/src/device/clientButtonDevice.cxx
	panda/src/device/clientDevice.I
	panda/src/device/clientDevice.cxx
	panda/src/device/clientDevice.h
	panda/src/device/clientTrackerDevice.I
	panda/src/device/trackerNode.I
	panda/src/device/trackerNode.h
	panda/src/display/callbackGraphicsWindow.cxx
	panda/src/display/graphicsWindow.cxx
	panda/src/display/graphicsWindowInputDevice.I
	panda/src/display/graphicsWindowInputDevice.cxx
	panda/src/display/graphicsWindowInputDevice.h
	panda/src/tinydisplay/tinyOsxGraphicsWindow.mm
	panda/src/tinydisplay/tinyXGraphicsWindow.cxx
	panda/src/windisplay/winGraphicsWindow.cxx
	panda/src/windisplay/winGraphicsWindow.h
	panda/src/x11display/x11GraphicsWindow.cxx
2016-03-19 14:54:56 +01:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 35add447e6 Build on Windows; add XInput gamepad implementation 2015-12-12 00:57:01 +01:00
rdb bd0683d101 Generalised input framework for raw mice, gamepads, trackers (incl. HMDs like Oculus Rift) 2015-12-11 15:26:40 +01:00
rdb db3ab953e4 Remove ppremake, genPyCode, and all hacks created to support them 2015-11-09 19:06:49 +01:00
rdb e6391c0b87 Merge branch 'release/1.9.x'
Conflicts:
	makepanda/installpanda.py
	makepanda/makepandacore.py
2015-11-05 20:55:01 +01:00
rdb 042dc82416 Handle DPI change on Windows 8.1+, add dpi-window-resize config option 2015-11-05 20:43:33 +01:00
rdb 8c259d4a20 Merge branch 'release/1.9.x' 2015-11-01 20:12:32 +01:00