summaryrefslogtreecommitdiff
path: root/main/main.cpp
AgeCommit message (Collapse)Author
2018-05-10Fix setting for pointing emulationvolzhs
Fix #18582 GLOBAL_DEF("input/something") is treated as Input Map setting, not as General.
2018-05-08Merge pull request #14622 from bruvzg/non-rectangular-windowsHein-Pieter van Braam
Experimental support for windows with per-pixel transparency.
2018-05-07Local debugger fixes and extensionsBlazej Floch
- Adds q/quit option to console debugging - Adds options (variable_prefix) - Breaks into debugger with Ctrl-C in local debug mode (Unix/Windows) - Added option to list all breakpoints - Fixes add/remove breakpoint bug (invalid path parsing) - Minor cleanup
2018-05-07Merge pull request #17353 from zmanuel/timer_hysteresis_multiframe_pr1Juan Linietsky
Use hysteresis for smoother physics update frequency
2018-05-02Merge pull request #17196 from RandomShaper/improve-gui-touchRémi Verschelde
Implement universal translation of touch to mouse (3.1)
2018-04-30Implement universal translation of touch to mousePedro J. Estébanez
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*) The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers. Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse. *: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest. On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction. Plus: Improve/fix tracking of current mouse position. ** Summary of changes to settings: ** - `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse` - New setting: `input/pointing_devices/emulate_mouse_from_touch`
2018-04-22Change ".." punctuation for "..." in editor strings (#16507)Hugo Locurcio
2018-04-19Enable DynamicFont oversampling by defaultHugo Locurcio
This results in a better DynamicFont appearance when scaled, which is especially noticeable when using the `2d` scaling mode.
2018-04-09Add hysteresis to physics timestep count per frameManuel Moos
Add new class _TimerSync to manage timestep calculations. The new class handles the decisions about simulation progression previously handled by main::iteration(). It is fed the current timer ticks and determines how many physics updates are to be run and what the delta argument to the _process() functions should be. The new class tries to keep the number of physics updates per frame as constant as possible from frame to frame. Ideally, it would be N steps every render frame, but even with perfectly regular rendering, the general case is that N or N+1 steps are required per frame, for some fixed N. The best guess for N is stored in typical_physics_steps. When determining the number of steps to take, no restrictions are imposed between the choice of typical_physics_steps and typical_physics_steps+1 steps. Should more or less steps than that be required, the accumulated remaining time (as before, stored in time_accum) needs to surpass its boundaries by some minimal threshold. Once surpassed, typical_physics_steps is updated to allow the new step count for future updates. Care is taken that the modified calculation of the number of physics steps is not observable from game code that only checks the delta parameters to the _process and _physics_process functions; in addition to modifying the number of steps, the _process argument is modified as well to stay in expected bounds. Extra care is taken that the accumulated steps still sum up to roughly the real elapsed time, up to a maximum tolerated difference. To allow the hysteresis code to work correctly on higher refresh monitors, the number of typical physics steps is not only recorded and kept consistent for single render frames, but for groups of them. Currently, up to 12 frames are grouped that way. The engine parameter physics_jitter_fix controls both the maximum tolerated difference between wall clock time and summed up _process arguments and the threshold for changing typical_physics_steps. It is given in units of the real physics frame slice 1/physics_fps. Set physics_jitter_fix to 0 to disable the effects of the new code here. It starts to be effective against the random physics jitter at around 0.02 to 0.05. at values greater than 1 it starts having ill effects on the engine's ability to react sensibly to dropped frames and framerate changes.
2018-04-07Experimental support for windows with per-pixel transparency (macOS, X11 and ↵bruvzg
Windows).
2018-03-21Add --print-fps option to output FPS to stdoutRémi Verschelde
Works both for the editor and games. Projects can still use "debug/settings/stdout/print_fps" to enable it permanently. The --print-fps option takes precedence (so works even if the project setting is disabled). That setting is also no longer redefined on the fly based on the verbose flag, that was a mess.
2018-03-15Fix debugger_stdout_settings being ignoredBernhard Liebl
2018-03-02Fix `--help` output, allow renderer override from command line ↵bruvzg
(`--video-driver`).
2018-02-26Allow running with a custom resource without a main sceneHein-Pieter van Braam
After 3f8a4cc7193e964f716fde2cd28a946669e2d8d6 trying to run an individual scene on a project without a main scene fails. We move the check until after we've determined whether or not we're trying to run an individual scene. We also stop trying to show the project manager if any game pack is found at all, unless the user explicitly asks for the project manager to be shown.
2018-02-24Add --quit option to help output and update manpageRémi Verschelde
2018-02-23Refactor version macros and fix related bugsRémi Verschelde
The previous logic with VERSION_MKSTRING was a bit unwieldy, so there were several places hardcoding their own variant of the version string, potentially with bugs (e.g. forgetting the patch number when defined). The new logic defines: - VERSION_BRANCH, the main 'major.minor' version (e.g. 3.1) - VERSION_NUMBER, which can be 'major.minor' or 'major.minor.patch', depending on whether the latter is defined (e.g. 3.1.4) - VERSION_FULL_CONFIG, which contains the version status (e.g. stable) and the module-specific suffix (e.g. mono) - VERSION_FULL_BUILD, same as above but with build/reference name (e.g. official, custom_build, mageia, etc.) Note: Slight change here, as the previous format had the build name *before* the module-specific suffix; now it's after - VERSION_FULL_NAME, same as before, so VERSION_FULL_BUILD prefixed with "Godot v" for readability Bugs fixed thanks to that: - Export templates version matching now properly takes VERSION_PATCH into account by relying on VERSION_FULL_CONFIG. - ClassDB hash no longer takes the build name into account, but limits itself to VERSION_FULL_CONFIG (build name is cosmetic, not relevant for the API hash). - Docs XML no longer hardcode the VERSION_STATUS, this was annoying. - Small cleanup in Windows .rc file thanks to new macros.
2018-02-19Added an auto quit and auto build flag to the command line options.Nathan Warden
2018-02-19Prevent loading project-specific config in Project ManagerRémi Verschelde
The Project Manager should share the same settings as the editor most of the time. The whole init stuff with Main::setup and Main::start needs a good cleanup though. Fixes #15199.
2018-02-18Merge pull request #16749 from PJB3005/18-02-16-project-manager-mono-debug-fixIgnacio Etcheverry
Makes project manager never initialize mono debug.
2018-02-17Ignore tools CLI flags in non-tools builds.Pieter-Jan Briers
Some flags were still parsed but either did nothing or broke everything. No reason to parse them.
2018-02-16Makes project manager never initialize mono debug.Pieter-Jan Briers
The heuristic whether we're in the project manager inside GDMono didn't work if the project manager was launched by not having any path to run. This is fixed now by making a Main::is_project_manager().
2018-02-14Merge pull request #15564 from RandomShaper/adpod-topmostRémi Verschelde
Add new window setting: always on top
2018-02-14Merge pull request #15741 from paulloz/bug-no-main-sceneRémi Verschelde
Fix bug when launching a game with no main scene
2018-02-13Always detect and use hiDPI in the project manager if neededHugo Locurcio
This makes its hiDPI behavior consistent with the editor.
2018-01-23Print FPS setting now only prints the game FPSZephilinox
2018-01-23Rename Fixed Fps to Physics Fps on Project Settingsvolzhs
Fixes #15981
2018-01-18Fix typos in code and docs with codespellRémi Verschelde
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-16Fix crash when closing the editorMariano Suligoy
2018-01-15Fix bug when launching a game with no main scenePaul Joannon
Check for a main scene after loading project settings and exit if there's none (except if launching in editor mode).
2018-01-11Destroy AudioServer after other non-core types are unregisteredRuslan Mustakov
This is important for some GDNative bindings and probably for Mono. They may keep references to audio objects which are freed when they are unregistered. If AudioServer is already deleted at that point, it causes segfaults.
2018-01-07Merge pull request #15297 from poke1024/runner-limit-errsRémi Verschelde
Limit number of errors and messages sent by runner
2018-01-05Add new window setting: always on topPedro J. Estébanez
Implemented for Windows and Linux.
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-04Change OS::initialize signature to return Error (fix segfault on x11)Emmanuel Leblond
2018-01-03Limit number of errors and messages sent by runnerBernhard Liebl
2018-01-03Merge pull request #12814 from guilhermefelipecgs/add_hardware_custom_cursorRémi Verschelde
Custom hardware-accelerated mouse cursor
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-29Editor: Respect -w command line flag.Andreas Haas
2017-12-20Fix editor crash on "save and exit" bugChong-U Lim
If a scene is modified and a user closes the editor and selects the "Save and exit" option in the modal dialog -- the editor crashes. This appears to be a result of the message queue being memdeleted AFTER visual servers have been destroyed. Remnant textures handled by the message queue throw a NRE when their own ~Texture destructors reference the visual servers. This fixes bugs: #12946 and #12813.
2017-12-20Correct license headers in main.cpp and voxel_light_baker.cppHein-Pieter van Braam
Sorry for the churn
2017-12-20Fix lightbaker clang-format issue and add license headersHein-Pieter van Braam
2017-12-19Added font oversampling supportJuan Linietsky
2017-12-17Add implementation for custom hardware cursorGuilherme Silva
2017-12-16Added custom editor splash (including sponsor logo).Juan Linietsky
2017-12-14GDScript files are converted to binary on export now.Juan Linietsky
2017-12-09Fixes vsync setting ignored when using a separate thread for renderingStefano Bonicatti
Setting the vsync in the main thread, after the rendering thread starts and takes the OpenGL context fails, so we need to do that before. Also, for some reason, the main thread cannot make current the context anymore. Fixes #13447
2017-12-07Style: Apply new clang-format 5.0 style to all filesRémi Verschelde
2017-11-26Disable logger by default.Juan Linietsky
2017-11-22Modified low processor sleep to 8000 and made it customizable (should be ↵Juan Linietsky
customizable for editor too)
2017-11-21Merge pull request #11895 from m4nu3lf/rendering/separate_threadJuan Linietsky
Restore rendering on a separate thread