Commit graph

595 commits

Author SHA1 Message Date
Rémi Verschelde e16f264a7e
Windows: Fix build with SCons 4.2.0
(cherry picked from commit c191cfbddf)
2021-08-01 11:08:36 +02:00
Rémi Verschelde 8e50c00a13 Windows: Appease capricious MSVC versions with moody headers
Fixes #37799.
Fixes #37986.

(cherry picked from commit 4d3a18d9ff)
2020-05-25 17:56:15 +02:00
Rémi Verschelde 513bfe496c SCons: Add 'split_libmodules' option to workaround linker issue
The new 'split_libmodules=yes' option is useful to work around linker
command line size limitations when linking a huge number of objects.
We're currently over 64k chars when linking libmodules.a on Windows
with MinGW, which triggers issues as seen in #30892.

Even on Linux, we can also reach linker command line size limitations
by adding more custom modules.

We force this option to True for MinGW on Windows, which fixes #30892.

Additional changes to lib splitting:

- Fix linking of the split module libs with interdependent symbols,
  hacking our way into LINKCOM and SHLINKCOM to set the `--start-group`
  and `--end-group` flags.
- Fix Python 3 compatibility in `methods.split_lib()`.
- Drop seemingly obsolete condition for 'msys' on 'posix'.
- Drop the unnecessary 'split_drivers' as the drivers lib is no longer
  too big since we moved all thirdparty builds to modules.

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
(cherry picked from commit c320a82213)
2020-01-06 12:52:07 +01:00
Guilherme Felipe 8ef5052967 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.

(cherry picked from commit 1bae73d7d0)
2019-11-12 11:10:53 +01:00
Yeongho Kim d2fbe4db07 Specify MINGW_HAS_SECURE_API=1 2019-10-25 21:33:26 +09:00
Kenneth Lee aa36c0c56c Fixes build for Windows cross-compilation
Fixes #28299

(cherry picked from commit 5c5c3a590a)
2019-09-24 09:00:45 +02:00
KLee1248 2e5fa9f043 Use SHGetKnownFolderPath instead of SHGetFolderPathW.
When getting system directories for Windows, we currently use
SHGetFolderPathW. This is a deprecated function and doesn't support
"Downloads" folders.

As a replacement, this commit uses the newer SHGetKnownFolderPath
function, which is supported since Windows Vista. Godot 3.0 only
supports Windows 7+, so we don't need to use SHGetFolderPathW for
backwards compatibility.

Fixes #26876

(cherry picked from commit 3d908f57d8)
2019-09-24 09:00:45 +02:00
hbina085 8c2e10c393 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
(cherry picked from commit 9f0c6a6009)
2019-09-24 09:00:45 +02:00
Ibrahn Sahir 465056b6eb Check project settings live before lookup in crash handler
In x11, windows and osx crash handlers, check project settings exists
before looking up the crash handler message setting.
Avoids crashing the crash handler when handling a crash outside project
settings lifetime. Instead omitting the configurable message and
continuing with trace dump.

(cherry picked from commit 63068e2ccd)
2019-07-03 16:31:01 +02:00
Hendrikto 456eb53439 Remove unused imports
(cherry picked from commit 49a81308c0)
2019-04-20 20:15:44 +02:00
PouleyKetchoupp fac0f76b7a Fixed & improved Visual Studio custom debugger visualization 2019-03-12 08:59:30 +01:00
Rémi Verschelde b0f782a0e3 Disable driver fallback to GLES2 by default
GLES2 is not designed to be a drop-in replacement for the GLES3 backend,
so the fallback mode has to be used knowingly. It *can* make sense for
simple projects which make sure to handle the differences between both
rendering backends, but most users should stick to one supported backend.

By making it opt-in, we can now use this parameter to define whether to
export ETC textures to Android and iOS when using GLES3 + Fallback.

When using GLES3 without Fallback on Android, set the proper min GLES
version in the AndroidManifest.

Also made the option boolean and renamed it for clarity and to avoid
conflict with the previous String option (which would always evaluate as
"true" otherwise).

Fixes #26569.
2019-03-05 16:36:46 +01:00
Juan Linietsky a1e73dcc94 Add support for event accumlation (off by default, on for editor), fixes #26536 2019-03-03 19:53:13 -03:00
Juan Linietsky 8b4c4d9b2f Implement a more coherent (and way less hack) way to block animation updates, fixes #24618 2019-03-03 17:57:16 -03:00
Juan Linietsky ae886a6f32 Ability to keep pumping messages while being debugged, may be a solution for #21431 2019-03-03 17:12:19 -03:00
Juan Linietsky 5eeb06ffd1 -Remove harcoded opengl extension testing from OS, ask rasterizer instead.
-Fixed a bug where etc textures were imported broken
2019-02-26 11:58:47 -03:00
Junwei Ng 731b152dc1 Update Windows global mouse position at startup
Fixes issue #8145 for Windows, in the same manner as
issue #21910 fixed it for X11.
2019-02-25 01:10:18 +09:00
Rémi Verschelde 51c9ffaec0 Drop RtAudio driver on Windows
We've been defaulting to WASAPI since 3.0 and it's superior to RtAudio
in all aspects.

Obsoletes and closes #25503.

Also enable WINMIDI on MinGW, this had been missed initially.

Fix os_windows.cpp and crash_handler_windows.cpp which had weird
dependencies on RtAudio.h's includes (ugh).
2019-02-20 13:47:01 +01:00
Marcelo Fernandez 0c5f87531d Fix compiling with use_mingw flag on Windows 2019-02-19 10:02:24 -03:00
Rémi Verschelde bc9c1e899e
Merge pull request #25842 from marcelofg55/windows_timezone
Fix get_time_zone_info returning inverted bias on Windows/UWP
2019-02-13 14:28:11 +01:00
Marcelo Fernandez 4d43aba31e Fix get_time_zone_info returning inverted bias on Windows/UWP 2019-02-13 09:10:26 -03:00
Rémi Verschelde bc26d0d6cd Platform: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `platform/iphone/sem_iphone.h` -> `semaphore_iphone.h`
  (same for `osx`)
- `platform/uwp/gl_context_egl.h` -> `context_egl_uwp.h`
- in `platform/windows`: `context_gl_win.h`, `crash_handler_win.h`,
  `godot_win.cpp`, `joypad.h` and `key_mapping_win.h` all renamed to
  use `windows`. Some classes renamed accordingly too.
- `EditorExportAndroid` and `EditorExportUWP` renamed to
  `EditorExportPlatformAndroid` and `EditorExportPlatformUWP`
- `power_android` and `power_osx` renamed to `PowerAndroid` and
  `PowerOSX`
- `OSUWP` renamed to `OS_UWP`

Dropped:
- `platform/windows/ctxgl_procaddr.h`
2019-02-12 16:56:25 +01:00
Rémi Verschelde 75dae1b9a9 Drivers, main, servers: Ensure classes match their header filename
Renamed:
- `drivers/alsamidi/alsa_midi.h` -> `midi_driver_alsamidi.h`
  (same for `coremidi` and `winmidi`)
- `main/timer_sync.h` -> `main_timer_sync.h`
- `servers/visual/visual_server_global.h` -> `visual_server_globals.h`
2019-02-12 14:39:47 +01:00
Rémi Verschelde b867ef0eec
Merge pull request #25570 from Kanabenki/windows-relative-icon
Use relative path property hint for windows export icon
2019-02-08 16:50:14 +01:00
Ignacio Etcheverry 4e4e889c75
Merge pull request #25478 from neikeq/rr
Mono: Fix MonoPosixHelper not being found
2019-02-03 06:31:52 +01:00
Ignacio Etcheverry 41873ffa88 Added set_environment to OS class 2019-02-03 05:38:47 +01:00
Kanabenki 5890e7060e Use relative path property hint for windows export icon 2019-02-03 01:31:53 +01:00
Rémi Verschelde 70689ebffd Remove unused iostream includes 2019-01-28 12:16:22 +01:00
Marcelo Fernandez daf57bc81f Fix ALT+F4 being ignored with MOUSE_MODE_CAPTURED on Windows 2019-01-23 10:59:54 -03:00
Marcin Zawiejski 62f3611271 Fix GDI objects leak when setting custom cursor
Fixes #19906
2019-01-23 01:11:40 +01:00
Marcin Zawiejski 9ca649c67b
Set WINVER and _WIN32_WINNT values in VS project
While looking into a different issue, I've noticed that Visual Studio Intellisense does not work well for Godot project when using Windows Vista+ APIs (e.g. CreateThreadpool), i.e. it does not recognise the APIs because they are defined in Windows header files for Vista+ only.

This is because the WINVER and _WIN32_WINNT symbols don't have their values set in the generated Godot project file. This fixes the problem by setting the values when generating the project file.
2019-01-22 21:34:37 +01:00
Juan Linietsky ab843b1698 Raised executable priority on windows to avoid stuter, helps #25162 2019-01-22 16:04:54 -03:00
Juan Linietsky 0c9fd3c4b4 Avoid cyclic iteration check, fixes #24969 2019-01-22 13:17:39 -03:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
volzhs 84d060c768 Added OS.get_system_time_msecs() 2018-12-20 18:50:50 +09:00
Rémi Verschelde 57c3f6a94b
Merge pull request #20063 from moiman100/fix-button-mask
Unified button mask behavior across platforms
2018-12-14 23:31:52 +01:00
Rémi Verschelde a99e90b258 SCons: Properly set bits variable as string for MSVC detection 2018-12-04 14:30:49 +01:00
Marcelo Fernandez 711bc1c07e Fix wrong size and position when windows is minimized on Windows 2018-11-30 00:36:48 -03:00
Rémi Verschelde 173b342ca7 Remove trailing whitespace
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'`
(+ manual revert of some thirdparty code under `platform/android`).
2018-11-20 11:15:02 +01:00
Pedro J. Estébanez b5c56f6cca Fix mouse mode restoration on Windows
Fixes #23494.
2018-11-09 23:55:19 +01:00
Hein-Pieter van Braam 19d91f788d Properly export the various 'use dGPU' symbols when building with MingW
This fixes exporting the NvOptimusEnablement export when building with
MingW. This also adds the equivalent for AMD.

This fixes #23400
2018-11-03 10:55:03 +01:00
Rémi Verschelde 8ac1bcfd3d Fix init of VisualServerRaster
Contrarily to what #23434 assumed, this is not a memory leak,
the VisualServerRaster instance is passed as a parameter to
VisualServerWrapMT's constructor.

Fixes #23437.
2018-11-01 19:23:12 +01:00
George Marques 4c9d734a75 Fix initialization of visual server in all platforms
Avoid leaking an extra instance when using threads. Also fix threaded
loading issues on Android and iOS.
2018-11-01 10:27:04 -03:00
Aaron Franke dc2e73499a Fix compile warnings for Windows from Linux
At least the ones I got when I compiled it using Mingw64 POSIX on Xubuntu 18.04. Plus use the Size2 of get_window_size() directly, rather than reconstructing it.
2018-10-19 09:11:14 -04:00
Dualtagh Murray b902a2f2a7 Fixing warnings generated by MSVC
Fixes #22684.
2018-10-19 11:45:24 +02:00
Aaron Franke 4f7b33cdcf Remove redundant "== false" code
Some of this code has been re-organized.
f
2018-10-06 16:20:41 -04:00
Aaron Franke 37386f112b Remove redundant "== true" code
If it can be compared to a boolean, it can be evaluated as one in-place.
2018-10-06 16:12:36 -04:00
Rémi Verschelde c026e3957a Fix warnings on virtual methods [-Woverloaded-virtual] [-Wdelete-non-virtual-dtor]
Fixes the following Clang 7 warnings:
```
editor/editor_help.h:123:7: warning: 'EditorHelpIndex::popup' hides overloaded virtual function [-Woverloaded-virtual]
editor/editor_help.h:95:7: warning: 'EditorHelpSearch::popup' hides overloaded virtual function [-Woverloaded-virtual]
editor/editor_help.h:96:7: warning: 'EditorHelpSearch::popup' hides overloaded virtual function [-Woverloaded-virtual]
editor/plugins/curve_editor_plugin.h:141:15: warning: 'CurvePreviewGenerator::generate' hides overloaded virtual function [-Woverloaded-virtual]
editor/plugins/script_editor_plugin.h:70:7: warning: 'ScriptEditorQuickOpen::popup' hides overloaded virtual function [-Woverloaded-virtual]
editor/quick_open.h:69:7: warning: 'EditorQuickOpen::popup' hides overloaded virtual function [-Woverloaded-virtual]
main/tests/test_io.cpp:53:15: warning: 'TestIO::TestMainLoop::input_event' hides overloaded virtual function [-Woverloaded-virtual]
servers/audio/effects/audio_effect_record.h:69:15: warning: 'AudioEffectRecordInstance::process_silence' hides overloaded virtual function [-Woverloaded-virtual]

core/os/memory.h:119:2: warning: destructor called on non-final 'ContextGL_X11' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'EditorScriptCodeCompletionCache' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'Engine' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'PhysicalBone::JointData' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'VisualServerScene' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'VisualServerViewport' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
```
2018-10-02 13:40:17 +02:00
Rémi Verschelde 93570be2de
Merge pull request #22368 from moiman100/raw-input-fixes
Windows raw input fixes
2018-10-02 09:26:18 +02:00
Rémi Verschelde 6bfb7944d9 SCons: Remove avoidable defines from main env's CPPPATH
Also finally move freetype to its own env and disable warnings for it.
Still needs some work to fix the awkward situation of the freetype and
svg modules used in scene/ and editor/ respectively.
2018-10-01 11:59:22 +02:00