Commit graph

396 commits

Author SHA1 Message Date
Fabio Alessandrelli 5f681d0b0f Allow non blocking UDP put_packet in C++.
- Add blocking mode option to PacketPeerUDP.
- put_packet returns ERR_UNAVAILABLE when operation would block.
- ENet module uses non-blocking UDP.
2017-03-24 02:30:11 +01:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
Rémi Verschelde e1c1d7d1d7 Add a bunch of missing Godot headers in own files 2017-03-05 15:47:28 +01:00
Rémi Verschelde 49c065d29c Refactoring: rename tools/editor/ to editor/
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.
2017-03-05 14:21:25 +01:00
Julian Murgia 94103c0c02 Add API to access battery power state
Done:
- X11, server (tested)
- Windows (developed, would be nice to retest)
- OSX (not tested)
Prepared (not developed):
- Android (code is here, but may not compile)
- iphone
- winrt
- bb10
- haiku
- javascript
2017-03-04 18:04:29 +01:00
Rémi Verschelde 34a0aa6900 Merge pull request #7862 from Hinsbart/joypad_connections
Better handling of joypad device IDs.
2017-02-26 21:30:24 +01:00
Andreas Haas a175ac7032
Better handling of joypad device IDs.
Now InputDefault is responsible for giving out joypad device IDs to the platform, instead of each platform handling this itself.
This makes it possible for c++ modules to add their own "custom" gamepad devices, without the risk of messing up events in case the user also has regular gamepads attached (using the OS code).
For now, it's implemented for the main desktop platforms.
Possible targets for future work: android, uwp, javascript
2017-02-26 21:01:31 +01:00
Rémi Verschelde 2d3dd6f6ee Merge pull request #7854 from neikeq/pr-execute-iter
Replace misuse of list iteration
2017-02-26 20:23:10 +01:00
Rémi Verschelde ca805744fb Merge pull request #7848 from hpvb/fix-7839
Windows: Close audiodriver sooner on exit
2017-02-26 20:18:49 +01:00
Juan Linietsky de0045cf1b -renamed globals.h to global_config.cpp (this seems to have caused a few modified files)
-.pck and .zip exporting redone, seems to be working..
2017-02-21 00:06:30 -03:00
Ignacio Etcheverry 0cd309c5c7 Replace misuse of list iteration 2017-02-20 19:53:14 +01:00
Juan Linietsky f6950956bd Editor Export Settings Dialog is completed!! Now on to make some exporters.. 2017-02-19 23:21:35 -03:00
Hein-Pieter van Braam 04e51859f0 Windows: Close audiodriver sooner on exit
In #7839 I see the same error that was fixed in #7833 occuring on the
Windows platform. This moves the audio driver closing to the same place
in OS_Windows::finalize() as it is in OS_X11::finalize()

This fixes #7839
2017-02-19 20:45:17 +01:00
Rémi Verschelde 70b9aa379d Merge pull request #7581 from Faless/v6_wild_bind
TCP/UDP listen bind to address and bugfixes
2017-02-12 23:31:40 +01:00
Rémi Verschelde 3cab47adba Merge pull request #7782 from SaracenOne/windows_relative_cursor_fix
Fix relative cursor data in CAPTURED mouse mode on Windows.
2017-02-12 23:26:19 +01:00
Rémi Verschelde 43d947f54b Merge pull request #7771 from Limb/winaudiodriver
Close out audio drivers when exiting on Windows.
2017-02-12 23:24:09 +01:00
Rémi Verschelde dc5f978f28 Merge pull request #7770 from Limb/removedx9
Removed DX9 Rasterizer in windows
2017-02-12 23:23:34 +01:00
Saracen 523b69771b Fix glitches when sampling relative cursor data in CAPTURED mouse mode on Windows. 2017-02-11 03:54:36 +00:00
Kenneth Lorthioir bd893f346a Close out audio drivers when exiting.
Prevents a crash when closing the project manager.
2017-02-09 10:40:13 -05:00
Kenneth Lorthioir 091202589c Removed DX9 Rasterizer in windows.
This doesn't seem to be needed anymore and the code to free the unused
rasterizer was throwing a memory violation since it was getting set to a
value somehow.
2017-02-09 10:27:40 -05:00
Kenneth Lorthioir 6961ed21bb Fixed compilation issues with Visual Studio 2017-02-08 18:14:52 -05:00
Juan Linietsky 96de0141cc Removed import/export system, will start new one from scratch. 2017-01-25 21:57:08 -03:00
Ilija Boshkov 1005a56e5a Added focus tracking in X11 and Windows classes, added new confined mouse mode (#7162) 2017-01-25 19:21:41 +01:00
Fabio Alessandrelli 5dc7c920bf Fix buffer size check in UDP socket.
We were reserving 12 bytes from the buffer for ip, port, and length, but since
IPv6 introduction we should be reserving 24 (IPv6 are 16 bytes)
2017-01-23 20:18:23 +01:00
Fabio Alessandrelli 9336857132 Use default UDP ring buffer size of 65536 for clients
We should probably create a specific function for setting the
recv buffer anyway. UDP sockets does not need to bind (listen)
to be able to call recvfrom. This is especially useful for clients
who just call set_send_address and start communicating with a server.
2017-01-23 20:18:23 +01:00
Fabio Alessandrelli 68dc969f8c Fix bug causing UDP socket to close after the first send if not listening
The ring buffer for receiving packets was not resized in constructor
2017-01-23 20:18:23 +01:00
Fabio Alessandrelli fa0cb7da0e Avoid deadlock when writing/reading data on a connecting TCP socket
TCP status polling is always performed as non blocking.
Trying to put a packet on a connecting socket will fail immediately.
2017-01-23 20:18:23 +01:00
Fabio Alessandrelli 88a56ba783 Remove set_ip_type from network classes (no longer needed)
- TCP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `connect` -> resolve using best protocol (UNSPEC), socket from address type

- UDP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type
    (to change socket type you must first call `close` it)
2017-01-23 20:18:22 +01:00
Fabio Alessandrelli 2fe4ef6699 Implement UDP listen bind address 2017-01-23 20:18:18 +01:00
Fabio Alessandrelli b2839343ca Implement TCP Server bind address 2017-01-23 20:15:20 +01:00
Fabio Alessandrelli 98a7e2b4e0 Convert validity checks of IP_Address to is_valid method. 2017-01-23 20:15:20 +01:00
Fabio Alessandrelli e4b9b37ccf Avoid calling close when polling a UDP peer without socket 2017-01-23 20:15:20 +01:00
Rémi Verschelde 0a9aee6b1d Merge pull request #7558 from Faless/fix_windows_output
Fix gibberish output for windows/mingw.
2017-01-16 19:28:03 +01:00
Rémi Verschelde 7b059965e8 Adapt platforms to AudioServer refactoring
Fixes compilation on Windows and likely other platforms (at least
as far as AudioServer changes were concerned), though they were
not tested.
2017-01-16 19:19:45 +01:00
Fabio Alessandrelli 3df934acad Fix gibberish output for windows/mingw.
%ls should be used instead of %s or %S to speficy narrow/wide charstring
in wprintf fwprintf

Fixes #6252
2017-01-16 18:56:28 +01:00
Fabio Alessandrelli c356ec5e8b Fix bug in windows TCP poll function
Bug introduced when implementing TCP disconnection detection.
(too much yank-paste).
Fixes #7545
2017-01-16 15:50:20 +01:00
Rémi Verschelde 2a0ddc1e89 Style: Various fixes to play nice with clang-format 2017-01-16 08:49:52 +01:00
Juan Linietsky b400c69cd4 Oops! Audio engine has vanished :D 2017-01-15 16:07:51 -03:00
Rémi Verschelde a992d3f74f Merge pull request #7510 from Faless/tcp_connect
TCP connect always opens the correct socket type
2017-01-15 00:26:46 +01:00
Rémi Verschelde 479790a841 StreamPeerWinsock: Fix changed declarations
Bug introduced in dcb95ec147.
2017-01-14 16:23:01 +01:00
Juan Linietsky dcb95ec147 removed duplicated functions in class hierarchy that were bound more than once
added a check to detect this case in the future
2017-01-14 11:10:42 -03:00
Rémi Verschelde 93ab45b6b5 Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
2017-01-14 14:52:23 +01:00
Juan Linietsky 6c512b88c2 UDP.set_send_address to UDP.set_dest_address 2017-01-14 00:54:21 -03:00
Juan Linietsky a97551902e rename Input.get_mouse_speed() to Input.get_last_mouse_speed() 2017-01-13 19:24:28 -03:00
Fabio Alessandrelli 55b4f3686d TCP connect always opens correct socket type
TCP client connections does not need to rely on ipv6 dual stack sockets
2017-01-13 19:02:39 +01:00
Fabio Alessandrelli 65483d57bf Improvements to scons defined WINVER/_WIN32_WINNT 2017-01-12 17:13:19 +01:00
Rémi Verschelde 6eeb994a7b Merge pull request #7493 from neikeq/pr-mingw-bits
Detect bits when building with MinGW
2017-01-10 17:17:10 +01:00
Ignacio Etcheverry 460f030b73 Detect bits when building with MinGW 2017-01-10 17:08:31 +01:00
Andreas Haas d963fa9a01
More fixes to Joypad renaming.
Windows did not compile anymore because DI8DEVTYPE_JOYPAD obviously isn't defined in the directx headers ^^
I also did the same renaming as in #7473 for the windows platform and reverted the changes in the gamepad
mappings.
2017-01-08 23:52:49 +01:00
Rémi Verschelde 5bfa4227b3 Finish replacement of joystick by joypad
Some parts were forgotten in 547a577.
2017-01-08 21:33:37 +01:00
Juan Linietsky 547a57777b renamed joystick to joypad everywhere around source code! 2017-01-08 17:06:33 -03:00
Rémi Verschelde 6323779596 Windows: Define _WIN32_WINRT to 0x0600 (Vista)
Passed as a compiler define to be sure it is always define before windows.h
is loaded. This means that Godot officially requires Vista API or later, it will
not work on Windows XP or earlier.

Also fix a bogus check for Windows 7 API.
2017-01-08 20:41:26 +01:00
Juan Linietsky 263d5fcff8 Added missing readers writers lock to windows, should compile and run again.. 2017-01-08 11:13:12 -03:00
Juan Linietsky aa60e02cf6 fixes compilation in windows? 2017-01-08 10:20:23 -03:00
Juan Linietsky 2ab83e1abb Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector 2017-01-07 18:26:38 -03:00
Rémi Verschelde dc0d08cc93 Move glad files to thirdparty dir 2017-01-06 22:42:19 +01:00
Juan Linietsky 53ce643e52 -Changed memory functions, Memory::alloc_static*, simplified them, made them aligned to 16
-Changed Vector<> template to fit this.
2017-01-06 10:15:44 -03:00
Juan Linietsky 495d059a74 Merge branch 'master' of https://github.com/godotengine/godot 2017-01-05 09:18:03 -03:00
Juan Linietsky 0f7af4ea51 -Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
2017-01-05 09:16:00 -03:00
BastiaanOlij 55d425807f First set of changes to fix compilation errors and initialise the gles3 renderer for Mac OS X. Still broken at this point. 2017-01-04 23:34:02 +11:00
Rémi Verschelde 3f3f5a5359 Merge remote-tracking branch 'origin/gles3' into gles3-on-master
Various merge conflicts have been fixed manually and some mistakes
might have been made - time will tell :)
2017-01-02 21:52:26 +01:00
Rémi Verschelde 0b2771bd65 Merge pull request #7271 from Faless/ipv6_cleanup
Fixes and improvementes for IPv6 implementation.
2017-01-02 15:51:45 +01:00
Rémi Verschelde c7bc44d5ad Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!
2017-01-01 22:03:33 +01:00
reduz 289bc881aa now it really works on window for real 2016-12-25 08:05:23 -03:00
reduz 0d4abf2aa3 fixed a horrible bug on Windows AMD, scenes saved until now in this branch
are no longer valid :(
2016-12-24 16:23:30 -03:00
reduz 72b844c349 Godot works on Windows again.. 2016-12-21 02:29:58 -03:00
Fabio Alessandrelli 1aff508dd9 IP_Address now handle IPv4 and IPv6 transparently
IP_Address changes:
- Converts to and from String transparently while handling IPv4 as IPv6
  mapped (::ffff:[IP]) address internally.
- Completely remove AddrType enum.
- Setting/Getting of ip array is now only possible through dedicated functions
  (ie. set_ipv4, get_ipv4, set_ipv6, get_ipv6)
- Add function to know if the address is a valid IPv4 (for IP implementation and enet)
2016-12-09 18:24:59 +01:00
Fabio Alessandrelli c18c5013f8 Migrate int.IP_TYPE_ constants to IP.TYPE_ 2016-12-09 18:24:59 +01:00
Fabio Alessandrelli 4d90a4fcd5 Move V6ONLY flag selection inside helpers 2016-12-09 18:24:59 +01:00
Fabio Alessandrelli 9200da58e4 Automatically map IPv4 address to IPv6 when needed 2016-12-09 18:24:59 +01:00
Fabio Alessandrelli 95bdd97768 Use an instance variable for ip_type in raw sockets
PacketPeerUDP/StreamPeerTCP/TCP_Server now uses an instance variable
to store the selected ip_type (IPv4/IPv6/ANY, where ANY = dual stack).
All calls to resolve addresses, sending/receving data, connecting/listening
will use that socket type.
2016-12-09 18:24:59 +01:00
Fabio Alessandrelli 4f07b595a1 Properly handle tcp connection failure 2016-12-09 18:24:58 +01:00
Rémi Verschelde f28ff8a208 Fix console output for MinGW compilers
Reworked patch from @jay3d (#7116).
2016-11-28 15:12:54 +01:00
ISylvox b5c383fd61 vsnc --> vsync 2016-11-08 21:06:57 +07:00
Rémi Verschelde cc95d4448c scons: Reorder options for clarity
Also prefix all thirdparty-related toggles with `builtin`.
2016-11-03 07:45:08 +01:00
Rémi Verschelde f34151ff0f style: Various other PEP8 fixes in Python files
Done with `autopep8 --select=E7`, fixes:

- E701 - Put colon-separated compound statement on separate lines.
- E702 - Put semicolon-separated compound statement on separate lines.
- E703 - Put semicolon-separated compound statement on separate lines.
- E711 - Fix comparison with None.
- E712 - Fix (trivial case of) comparison with boolean.
- E713 - Fix (trivial case of) non-membership check.
- E721 - Fix various deprecated code (via lib2to3).
2016-11-01 00:35:16 +01:00
Rémi Verschelde 817dd7ccbb style: Fix PEP8 blank lines issues in Python files
Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
2016-11-01 00:35:16 +01:00
Rémi Verschelde d4c17700aa style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-01 00:35:16 +01:00
Rémi Verschelde 97c8508f5e style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:

- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
2016-11-01 00:33:51 +01:00
Fabio Alessandrelli eb27e993f0 TCP/UDP Listen sockets can now be set to IPv6 only 2016-10-30 17:46:05 +01:00
Fabio Alessandrelli 812908e236 Fix windows debugger connection problems.
Unify network socket creation between platform.
Ensure IPV6_V6ONLY flag is not set on sockets (allow IPv4 connection in IPv6 socket, dual-stack).
2016-10-30 17:46:05 +01:00
Fabio Alessandrelli ee69bd81cf TCPServer listen now default to IP type ANY (v6 socket with v4 support) 2016-10-30 17:46:05 +01:00
George Marques a52cbd65a8 Merge pull request #6937 from SuperUserNameMan/fix_win_standalone_msvc_and_mingw_incompatibilities
fix bug introduced by #6501
2016-10-28 20:57:51 -02:00
yg2f f7773d499d fix bug introduced by #6501
( @Akien : this PR is for current HEAD only, not to be cherry-picked for 2.1.1 )

this is manual revertion of #6501 which introduced a bug that prevented
scons from detecting Mingw under Windows when MSVC was installed.
(thanks to @vnen for finding this)

AND
it fixes the actual bug that prevented scons from detecting MSVC standalone
compiler ( a confusions between ``VSINSTALLDIR`` and ``VCINSTALLDIR`` )

The freeware Standalone MSVC C++ Build Tools are available here :
http://landinghub.visualstudio.com/visual-cpp-build-tools
2016-10-26 19:29:30 +02:00
Fabio Alessandrelli 25e29972a9 Fix PacketPeerUDP get_packet_port()
Properly convert port field from network to system ordering on incoming packets.
2016-10-26 18:27:01 +02:00
Rémi Verschelde c67e3a485d Merge pull request #6925 from godotengine/ipv6
Adding IPv6 support
2016-10-26 14:32:51 +02:00
Fabio Alessandrelli 80e911647c Pass correct address size (ipv4,ipv6) to socket connect, bind, sendto
The address size passed to network system calls now reflects the the actual IP type (v4 or v6).
Fix Windows and OSX ipv6 sockets
2016-10-26 08:20:31 +02:00
George Marques 414d58e6c0
Fix the hiding of mouse cursor before interaction
Fix part of #6633
2016-10-20 20:01:28 -02:00
Ariel Manzur 672225b710 added windows support for ipv6, cleaned up unix code 2016-10-20 07:04:10 -03:00
Rémi Verschelde c23e8797f1 Merge pull request #6855 from vnen/xaudio2-driver
Isolate XAudio2 driver
2016-10-18 07:22:10 +02:00
George Marques f3102160a1
Isolate XAudio2 driver
Now it's possible to compile for Windows platform if wanted. It's
supported only for Windows 8 or later, so it's not enabled by default.
2016-10-17 20:42:12 -02:00
Rémi Verschelde e96c49f849 Merge pull request #6850 from akien-mga/pr-scsub-shebang
SCsub: Add python shebang as a hint for syntax highlighting
2016-10-17 20:13:18 +02:00
Rémi Verschelde fc8ccd5b8c SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.
2016-10-17 20:10:46 +02:00
Błażej Szczygieł 4ffa8f224d Theora: Don't compile unnecessary files, rename "x86_opt_*" 2016-10-16 22:31:27 +02:00
Rémi Verschelde cbf52606f4 zlib: Split thirdparty files, simplify scons option 2016-10-15 12:20:47 +02:00
Rémi Verschelde 36738ddda4 glew: Split thirdparty files and isolate env
Not fully happy about the way this one interacts with the various
platforms. Maybe the platform_config.h should be generated by the
SCsub instead of passing a define just to know where is the header.
2016-10-15 12:01:28 +02:00
Rémi Verschelde f63bf12193 Drop nedmalloc which is apparently not used anymore 2016-10-14 18:21:23 +02:00
Juan Linietsky 1527cf8c0d 2D Shaders are working again using the new syntax, though all is buggy in general 2016-10-10 18:31:01 -03:00
Juan Linietsky 22d83bc9f6 Begining of GLES3 renderer:
-Most 2D drawing is implemented
-Missing shaders
-Missing all 3D
-Editor needs to be set on update always to be used, otherwise it does not refresh
-Large parts of editor not working
2016-10-03 21:35:16 +02:00
Rémi Verschelde 9fce85f9d7 Merge pull request #6501 from SuperUserNameMan/windows_compile_with_standalone_msvc
scons detects standalone MSVC on Windows
2016-10-03 11:36:44 +02:00
Rémi Verschelde 90f4e76a46 Merge pull request #6479 from RandomShaper/improve-debug-focus
Improve debug focus behavior
2016-10-03 11:36:01 +02:00
Marc Gilleron 0c09de3ef1 Windows: prevent huge prints from crashing the engine 2016-09-29 03:15:12 +02:00
yg2f 663d4ee7de scons detects standalone MSVC on Windows
Under Windows, Scons is now capable of detecting and compiling with
standalone MSVC compilers (aka "Visual C++ Build Tools").
http://landinghub.visualstudio.com/visual-cpp-build-tools

Tried with version 2015, and native x86 and x64 compilers under
Windows 10 pro 64 and Windows 8.1 64, with the default Win8 SDK
provided by the "Visual C++ Build Tools" web-installer.

Follow the same compiling instructions than for compiling with Visual
Studio, except that Visual Studio is no more required.

KNOWN ISSUES :
- ``methods.detect_visual_c_compiler_version()`` will emit a warning message
on computers where the ``VSINSTALLDIR`` environement variable is not present.
But it should compile just fine and still automatically detects the 32 or
64 bits according to the compiler you picked.

TODO :
- eventually, update ``platform/winrt/dectet.py`` with function
``methods.msvc_is_detected()`` and try to compile winrt/UWP with
these standalone compilers (if you did not select Win10 SDK when
installing the standalone tools, you can run it again).
- update doc to make users aware of "Visual C++ Build Tools" aka
"stadalone MSVC".
- eventually, update ``methods.detect_visual_c_compiler_version()``
2016-09-16 11:17:57 +02:00
Pedro J. Estébanez 66dac878ac Improve debug focus behavior
Fix focusing debugged game on Windows
Add re-focusing editor on continue
2016-09-14 04:02:18 +02:00
Juan Linietsky 7a27d5d9e7 Merge pull request #6363 from vnen/winrt
Fix the support for WinRT/UWP
2016-09-10 11:47:42 -03:00
George Marques e21702f764
Implement missing WinRT functions
- Fix buildsystem for WinRT/UWP platform.
- Add audio driver and joystick mapping for WinRT.
- Enable thread class for WinRT.
- Refactor MSVC compiler architecture detection to methods.py, so it can
  be used by Windows and WinRT.
2016-09-03 19:28:49 -03:00
Mario Schlack f0b6a242cc Hide the mouse cursor when MOUSE_MODE_CAPTURED is activated. 2016-08-29 13:14:38 +08:00
Juan Linietsky 6efbe9342a fix to mingw build 2016-08-20 01:55:53 -03:00
Juan Linietsky 38338e90c0 ENet windows compilation fixes.
For reference, when you include a Windows header (be it directly windows.h or something that includes it)
put it at the end of the includes. it seems I forgot.
2016-08-20 01:05:57 -03:00
George Marques 0bc589a0c7
Fix Windows resource script 2016-07-27 15:35:49 -03:00
George Marques b48fd16add
Improve Windows application details 2016-07-27 12:37:12 -03:00
Rémi Verschelde fd659e869b Windows: Make alert message box use MB_TASKMODAL
This flag pauses the current running thread, allowing for the user to see the
alert and acknowledge it before the thread continues (and e.g. crashes :)).

Thanks to @SuperUserNameMan for finding it.
Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx
2016-07-26 15:16:45 +02:00
George Marques 7be70c5a3c
Avoid changing position when the window is fullscreen 2016-07-24 12:07:59 -03:00
Rémi Verschelde b623acb718 Merge pull request #5841 from vnen/fix-windows-wheel
Fix mouse wheel event position on Windows
2016-07-21 17:31:24 +02:00
Rémi Verschelde d723e5a62f Merge pull request #5560 from vnen/os-request-attention
Add OS.request_attention() for Windows
2016-07-21 17:29:45 +02:00
George Marques f4c0bc20c3
Fix mouse wheel event position on Windows 2016-07-21 12:14:25 -03:00
Rémi Verschelde 523e46ad0a Revert "Make editor compatible with Windows high contrast themes"
This reverts commit 85a5290ee8.

The patch itself is good and it could maybe be readded in the future,
but right now Microsoft forced its Windows 10 "update" on people with older
Intel HD Graphics 3000 IGP without ensuring that they can ship proper drivers,
and such users seem to get Godot crashing due to this patch. Sorry :(
Closes #5452.
2016-07-18 00:24:21 +02:00
Juan Linietsky 28641fd9b8 Merge pull request #5525 from SuperUserNameMan/window_get_latin_kb_variant
windows get_latin_keyboard_variant() implementation and gdscript binding, #5503
2016-07-10 12:41:05 -03:00
George Marques 5c355a63d3
Add OS.request_attention() for Windows 2016-07-05 12:29:08 -03:00
SuperUserNameMan 7a142780f0 windows get_latin_keyboard_variant() implementation and gdscript binding 2016-07-03 19:35:13 +02:00
Andreas Haas 6856c52491 Windows: prevent freeze while moving or resizing the game window.
When moving or resizing the window, Windows spins up a seperate event-loop, effectively blocking the normal one.
To work around this, we're starting a timer that will continue sending WM_TIMER messages which we can use to keep the mainloop running.

fixes #4695
2016-07-01 16:55:53 +02:00
SuperUserNameMan 2511f48339 fixes #5464 windows_joystick close_joystick bug 2016-06-29 23:00:45 +02:00
George Marques bf44275b1a
Fix visual server error when minimizing the window 2016-06-26 18:54:34 -03:00
Rémi Verschelde 0a72f9ccb8 Merge pull request #5362 from J08nY/png
libpng: New version 1.6.27
2016-06-23 07:40:03 +02:00
Pedro J. Estébanez 85a5290ee8 Make editor compatible with Windows high contrast themes
By providing a manifest specifying the targeted Windows versions (as per https://msdn.microsoft.com/en-us/library/windows/desktop/hh404233(v=vs.85).aspx#_______supporting_high_contrast_themes_in_windows_8_and_later) now the Godot editor renders normally under a high contrast theme on Windows, instead of staying white/black.
2016-06-23 00:14:15 +02:00
J08nY 0ab05b09e4
Fixed iCCp chunk in pngs
neccesary for libpng 1.6.27 to work silently
2016-06-22 21:13:29 +02:00
Rémi Verschelde 57e1387199 Merge pull request #5225 from Hinsbart/x_rumble
Windows: Support gamepad vibration using XInput.
2016-06-19 12:59:18 +02:00
Rémi Verschelde a7fc04626a Add missing license headers in our source files (#5255)
Also removes a couple wrong Godot headers from third-party source files.
2016-06-18 14:46:12 +02:00
Andreas Haas 0e8b860048 Windows: Support gamepad vibration using XInput. 2016-06-15 14:40:57 +02:00
Juan Linietsky fc7adf0b4c property output unix seconds since epoch in windows get_system_time_secs, fixes #5155 2016-06-11 14:10:11 -03:00
Juan Linietsky 94a6ff3d7a -make freetype build for all platforms the same, default as builtin except on x11.
closes #5119
2016-06-09 21:28:07 -03:00
Rémi Verschelde 768e925271 GLEW: Define static + enabled and includes via SCons
This allows us not to have to hack our definitions in the upstream files,
making it easier to upgrade to newer versions in the future.

For the include paths to work, the headers are moved to a GL subfolder to
match their upstream location.
2016-06-08 00:16:27 +02:00
J08nY 3cfa920982
Windows: Hide mouse on MOUSE_MODE_CAPTURED
Fixes #5051
2016-06-07 12:57:01 +02:00
Juan Linietsky 2420e46b44 vsync support
-works on windows
-may not work on X11, if so please fix
-OSX does not seem to support disabling vsync
2016-06-05 19:14:33 -03:00
Juan Linietsky 007efb6a20 -customizable shortcuts in editor
-editor settings now save to .tres instead of .xml
-buttons can now hold a shortcut
2016-06-04 21:31:47 -03:00
volzhs 9073dc9963 change invalid characters when get user data dir on Windows & Unix
Can't create user data folder when project name has ``\ / : * ? " < > |`` characters on OS_Windows & OS_Unix.
So, change it to ``-`` to be able to make folder.

fixes #4928 and it's altanative to #4986.
2016-06-03 03:39:37 +09:00
Juan Linietsky 4ec2b1434f removed dependency on shcore.dll to get DPI
fixes #4973
2016-06-01 12:43:52 -03:00
Rémi Verschelde e6e878e139 Icon: Remove more grey capsules behind official logo 2016-05-30 00:41:42 +02:00
Juan Linietsky c7d24b7814 hidpi for now not available on mingw, sorry 2016-05-29 14:34:06 -03:00
Juan Linietsky 4f100f92d8 DPI Detection support
Windows only for now.
Many builds may break (older visual studio, mingw32)
2016-05-29 13:40:21 -03:00
Juan Linietsky 65615c0353 fix freetype paths on osx and mingw 2016-05-29 12:26:15 -03:00
Juan Linietsky 3e8eb396d7 Finalized DynamicFont implementation
-DynamicFont uses Freetype by default
-Editor fonts are now scalable thanks to this
-Cleaned up documentation browser and added fonts for this
2016-05-29 11:37:52 -03:00
Juan Linietsky 8be2fabbe5 Changed import workflow
-Rearrange favorites in fs dock with drag and drop
-Removed import -> sub-scene, moved to scenetree contextual menu
-Removed import -> re-import , moved and integrated to FS dock
-Added ability in FS dock to re-import more than one resource
simultaneously
-Added ability to drag from native filesystem explorer to Godot, only
works on Windows though
-Removed scene reimport merge options, never worked well. Eventually
merging materials should be re-added
-Added ability to set custom root node type when importing scenes
-Re-Import is now automatic, can be configured back to manual in editor
settings
-Added resource previews in property list for many resource types
2016-05-27 14:19:11 -03:00
Hubert Jarosz 33403d91f7
remove trailing whitespace 2016-05-21 15:29:25 +02:00
Mattias Cibien 4ee2999777 Working even when re-entering window. 2016-05-09 15:46:05 +02:00
Mattias Cibien 0b64b97d41 Cursor hides only in client area
At the moment is however restored when going out and then in again.
2016-05-09 15:18:08 +02:00
George Marques 9424c6c58f
Fix windows 64-bits build.
The change in `tools/doc/doc_data.cpp` is needed because the MSVC
compiler does not support variable length arrays.

Fix #4113
2016-05-03 16:35:36 -03:00
Mattias Cibien 8fb7280f39 Fixed behavior of OS.set_window_resizable
Should fix #4428. 
 * Minimize button is not hidden anymore
2016-05-03 15:58:05 +02:00
Rémi Verschelde f48d385644 Merge pull request #4274 from Griefchief/master
Fixes 64 bit MSVC builds, disables bits parameter
2016-05-02 17:45:21 +02:00
George Marques 2cd8e86aa0
Implement OS.get_process_ID for Windows
Based on code by @ratsdiov.
Closes #1733
2016-04-29 13:57:57 -03:00