1
0
forked from 0ad/0ad
Commit Graph

394 Commits

Author SHA1 Message Date
2bf1dbfd13 An awesome Rejoin-test tool by wraitii and Itms, fixes #4242, refs #3460.
Contrary to the serializationtest, initializes the secondary simstate
only once
before progressively applying updates.
Thus reproducing actual multiplayer rejoining, enabling developers to
analyze OOS reports solely from the replay file of the rejoined and a
non-rejoined client.

This was SVN commit r18940.
2016-11-15 13:26:58 +00:00
f3ab043c91 Rename isReplay to isNonVisualReplay becuase it is false for visual replays.
This was SVN commit r18937.
2016-11-14 17:19:53 +00:00
e3cdb2253d Fix calls to CXeromyces::Terminate in the main loop to fix several possible memory leaks.
Make init/shutdown order consistent in some places.

This was SVN commit r18589.
2016-08-08 08:32:57 +00:00
9e4f0cc543 Properly shut down SpiderMonkey using JS_ShutDown.
This also adds some validation to ensure the correct order of JS_Init,
JS_NewRuntime, JS_DestroyRuntime and JS_ShutDown calls.

Refs #3708

This was SVN commit r18584.
2016-08-06 15:41:59 +00:00
69b3c5871b Print warnings when no or the wrong list of mods is passed when starting non-visual replays. Patch by ArnH, fixes #2807.
This was SVN commit r18574.
2016-08-02 11:11:10 +00:00
87a93b2498 Add version command line option. Fixes #2965.
This was SVN commit r17611.
2016-01-08 19:35:33 +00:00
9cf9695d8d Graceful exit in case of trying to replay a directory. Fixes #3427.
Also remove unneeded variable ran_atlas.

This was SVN commit r17501.
2015-12-18 21:16:08 +00:00
9a2d0f803e Remove disabled by default SDL1 support.
Refs #2041.

This was SVN commit r17470.
2015-12-14 10:52:21 +00:00
a63e9c521d Optionally limit the framerate in menus to 50 FPS, to save power. Patch by elexis, fixes #2882
This was SVN commit r16927.
2015-08-20 13:22:44 +00:00
be93b31411 Visual replay of command files, patch by elexis.
Works with the command line argument
"-replay-visual=/path/to/commands.txt". It is not integrated to the main
menu GUI yet.

Refs #9.

This was SVN commit r16727.
2015-06-06 08:45:49 +00:00
01673b4c58 Add the -ooslog support for replays. Refs #3169, see also a7b18d02bf.
This was SVN commit r16531.
2015-04-11 18:12:35 +00:00
dec4552ffe Removes special handling of fullscreen toggle on OS X w/ SDL 1.2, which is no longer used
This was SVN commit r16453.
2015-03-21 21:01:01 +00:00
49e2ecea63 Automatically convert all CLogger format strings from wchar_t* to char*.
Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs sed
-i 's/LOG\(MESSAGE\|MESSAGERENDER\|WARNING\|ERROR\)(L/LOG\1(/g'

This was SVN commit r16183.
2015-01-22 20:31:30 +00:00
f10bdf5089 Fixes some issues when toggling fullscreen mode with SDL2, refs #2041:
* SDL_WINDOW_RESIZABLE must be set when creating the window, apparently
only fullscreen flags take effect in SDL_SetWindowFullscreen
* Stores window position, so a window can be restored to both its
original position and size, rather than defaults
* Changes initial window position from undefined to centered, it caused
some problems with window positioning returning from fullscreen mode

This was SVN commit r15827.
2014-09-28 22:10:09 +00:00
d62e3729d5 Improves SDL2 support, includes patch by yashi and fabio, refs #2041:
* Adds SDL color cursor implementation
* Adds config option for choosing preferred display in multimonitor
setup
* Uses text input API to better handle CJK input
* Fixes various hotkey and input bugs

SDL 1.2 is still the default and recommended, to test experimental SDL2
support, pass the --sdl2 flag to update-workspaces

This was SVN commit r15767.
2014-09-20 12:12:35 +00:00
7ada7dd2a8 Some tweaks to profiler2:
* separate the HTTP profiling server from the on-screen profiler
* allow shutting down the HTTP profiler
* print messages when enabling/disabling HTTP and GPU profilers

Patch by kingbasil, fixes #1862

This was SVN commit r15723.
2014-09-09 18:17:08 +00:00
523d220ac5 Add engine support to load mods from config and restart into mods.
Restructure mod mounting code a bit to make it reusable, and use it for
replays. Fixes #2703.

This was SVN commit r15676.
2014-08-25 16:02:40 +00:00
a2bd44b23a Exact stack rooting for JSON related ScriptInterface functions.
Refs #2415
Refs #2462

This was SVN commit r15603.
2014-08-02 22:21:50 +00:00
a7b18d02bf Add serialization test support for replays.
This was SVN commit r15547.
2014-07-22 19:41:49 +00:00
52f4cda439 Changes ToJSVal to take JS::MutableHandleValue instead of JS::Value&.
JS::MutableHandleValue is similar to JS::HandleValue, but the whole
JS::Value it points to can be replaced.
This change is needed for support of exact stack rooting and moving GC.
Contains a few other trivial API adjustments and style improvements too.

Refs #2462
Refs #2415

This was SVN commit r15534.
2014-07-14 19:52:35 +00:00
f115759901 Handle mods specified on the command line when using the archive builder.
This was SVN commit r15372.
2014-06-15 16:43:08 +00:00
2ad7187f92 Move XMPP polling to the mainloop. Should reduce lobby disconnects. Fixes #2491
This was SVN commit r15018.
2014-04-27 05:37:34 +00:00
e9e05f4efc Second (main) commit for the SpiderMonkey upgrade.
This commit contains all the required changes to our source files and
build scripts (hopefully).
A next commit will remove the old stuff of SpiderMonkey 1.8.5.

Spcial thanks to:
 - H4writer who helped a lot mainly with the performance issues we
had/have, but also with other problems or questions.
 - Leper for the review.
 - Historic_bruno for implementing the build scripts on Mac OS X and
testing on the Mac.
 - The people from the #jsapi channel and from
mozilla.dev.tech.js-engine who answered a lot of questions and helped
solving problems.
 - All the other people who helped

Refs #1886
Fixes #2442
Fixes #2416

This was SVN commit r14877.
2014-03-28 20:26:32 +00:00
4b1297b328 Removes g_ScriptingHost and implements global to compartment 1 to 1 relation.
Each GUI Page gets its own compartment and all ScriptInterfaces in the
same thread should now use the same JS Runtime.
This is required for the SpiderMonkey upgrade.
Check the ticket for details.

Closes #2241
Refs #1886
Refs #1966

This was SVN commit r14496.
2014-01-04 10:14:53 +00:00
93cffe9deb Remove the old and no longer used archive builder that rebuilt the archive while the game is running.
This approach isn't used anymore. Now we start the archive building with
parameters to pyrogeneis.

Refs #2241 (the code used g_ScriptingHost which is going to be removed)

This was SVN commit r14102.
2013-11-07 21:06:18 +00:00
2d1be3d47e Improve correctness of hotkeys at low framerates.
SDL queues up all the input events received in a frame. When the hotkey
system saw a key up/down event, it immediately updated its
HotkeyIsPressed state and then pushed a hotkey event onto the end of the
queue.

If the initial queue was e.g. [key-down shift, key-press Z, key-up
shift], the hotkey event triggered by Z would be processed after the
key-up shift had updated the HotkeyIsPressed state, so the handler of
the Z hotkey would not think the shift hotkey was pressed.

If the initial queue was e.g. [key-press Z, mouse-click], the hotkey
triggered by Z would be processed after the mouse-click event, so it
could apply to the wrong building selection.

Fix by pushing the hotkey events onto a special queue that gets
processed before any subsequent SDL input events.

Also update the HotkeyIsPressed status when the HOTKEYDOWN/HOTKEYUP
events are processed, not when they are generated, to guarantee they are
consistent with the DOWN/UP events.

Fixes #1869.

This was SVN commit r14057.
2013-10-30 01:38:32 +00:00
ce5c43fe03 Fix typo
This was SVN commit r13995.
2013-10-13 11:41:30 +00:00
a8a968d32c Catch exceptions by reference (by convention), based on patch from Markus, refs #1852
This was SVN commit r13421.
2013-05-22 22:27:53 +00:00
2f19cf86d3 Fix mod priority. Add user mod support. Fixes #1838.
This was SVN commit r13167.
2013-02-14 00:40:02 +00:00
d71f883d3e Adds warning when OS X users try to toggle fullscreen since it's disabled
This was SVN commit r12482.
2012-08-19 20:45:43 +00:00
011ba8255e New sound system implementation by stwf, refs #1223, #961.
Enables audio on OS X, refs #685, #931.
Fixes music not playing after a game, refs #946.

This was SVN commit r12428.
2012-08-15 00:10:44 +00:00
vts
6b50a660b9 Added elapsed real time (as opposed to elapsed simulation time) to MT_Interpolate messages. Fixes leftover TODO from #824. Refs #824.
This was SVN commit r11944.
2012-06-06 19:37:03 +00:00
0c233487ec Disables broken window resizing and fullscreen toggling on OS X. Fixes #1381. Refs #741
This was SVN commit r11752.
2012-05-04 23:30:46 +00:00
6f18a42269 Fixes bug detecting mouse focus change. Refs #748.
This was SVN commit r11594.
2012-04-21 07:14:39 +00:00
700e28480d Add command-line option to enable archivebuilder compression
This was SVN commit r11373.
2012-03-19 21:16:12 +00:00
5009636e39 Improve Android compatibility.
Basic touchscreen input for testing.
Better GLSL support for map rendering.

This was SVN commit r11155.
2012-02-25 17:29:27 +00:00
645a6e31be Basic touch input for testing
This was SVN commit r11081.
2012-02-15 22:27:02 +00:00
20d23eb340 Sysdep code for Android/ARM
This was SVN commit r11075.
2012-02-15 15:40:31 +00:00
f4625e69af Partial Android compatibility.
Remove unnecessary VM allocation (which seemingly causes problems on
Android due to mmap during static initialization).
Allow building without NVTT.

This was SVN commit r11074.
2012-02-15 13:58:58 +00:00
3fab2729b5 Partial SDL2 compatibility
This was SVN commit r11033.
2012-02-06 22:47:35 +00:00
09907adae3 Prevents game from running with root permissions with appropriately scary message on Unix-like OSes, based on patch by leper. Fixes #1058.
This was SVN commit r10916.
2012-01-16 03:30:55 +00:00
893cb2668e Renames our sdl.h to libsdl.h, to avoid case sensitivity errors when it includes SDL.h.
This was SVN commit r10904.
2012-01-12 23:32:27 +00:00
d82b85b8f3 Fix #1025 (add config option to toggle pause on window focus loss), based on patch by markcho.
This was SVN commit r10609.
2011-11-26 15:23:41 +00:00
18eefc7303 Fixes simulation replay mode in Windows.
This was SVN commit r10563.
2011-11-20 02:00:54 +00:00
cfb79c3062 # Add GPU performance profiling support.
Add some profiler region attributes.
Render events in profile visualiser.
Change profiler from GPL to MIT.

This was SVN commit r10492.
2011-11-09 13:09:01 +00:00
cb27a680bf Fix profiler shutdown order
This was SVN commit r10483.
2011-11-09 00:09:19 +00:00
09a02c96d5 Add initial code annotations for the new profiling tool
This was SVN commit r10466.
2011-11-04 01:35:50 +00:00
cccd6849a7 cleanup (requires update-workspaces)
lib_errors.cpp: replace with status.cpp, adapt to needs at work
wutil: fix runtime warning reported via feedback box
config: merge CONFIG_PARANOIA and !CONFIG_FINAL into
CONFIG_ENABLE_CHECKS
add openmp, pointer_typedefs.h

This was SVN commit r9410.
2011-05-03 12:38:42 +00:00
4663ac0fe7 split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)

This was SVN commit r9362.
2011-04-30 13:01:45 +00:00
e292c55e94 Delete warning-prone unused unusable event recording code
This was SVN commit r9355.
2011-04-30 00:06:30 +00:00