1
0
forked from 0ad/0ad
Commit Graph

30 Commits

Author SHA1 Message Date
7a71011149 Refactors smart pointers creation, reduces code duplication and improves exception safety.
This was SVN commit r24915.
2021-02-13 23:53:40 +00:00
5ee8354e99 Fix windows SEH hook when crashing in an std::thread
Follows 107d3d461f and other 'pthread->std::thread' diffs.

Windows uses Structured Exception Handling to allow reporting errors
(both C++ and hardware) nicely. This works by wrapping the code in a
__try __catch block.
The pthread wrapper did this automatically, but we now need to do it
explicitly for std::thread.

Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3261
This was SVN commit r24530.
2021-01-10 08:39:54 +00:00
935af751b9 Fix building without precompiled headers.
Broken in several recent diffs.
This also fixes (very) old missing standard headers.

Differential Revision: https://code.wildfiregames.com/D3110
This was SVN commit r24200.
2020-11-18 11:35:36 +00:00
8abc7c051b Include Pyrogenesis.h and os_path.h where needed
These two headers were missing in various places, preventing build in
some cases.

Patch By: linkmauve
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2481
This was SVN commit r23321.
2020-01-02 18:07:40 +00:00
dd891f6193 Fix User Reporter worker thread always using a full CPU-Thread
Summary:
This bug was introduced in 62dd922bc0.
Fixed by not using the predicate of the `wait` command.
It was wrong and even if it was right it wouldn't be really usefull.

Reviewed by: Angen
Fixes: #5620

Differential Revision: https://code.wildfiregames.com/D2373
This was SVN commit r23259.
2019-12-18 17:19:56 +00:00
62dd922bc0 pthread -> std::thread (5/7) - Replace sdl semaphore with condition variable
This removes a dependency on the SDL_Thread header.

Differential Revision: https://code.wildfiregames.com/D1921
This was SVN commit r22772.
2019-08-24 11:26:58 +00:00
107d3d461f pthread -> std::thread (3/7) - Replace pthread in other engine files
MapGenerator, TextureConverter, and some other files used pthread.

Differential Revision: https://code.wildfiregames.com/D1917
This was SVN commit r22649.
2019-08-12 08:16:28 +00:00
ba736916fc Clean up ThreadUtil, use standard C++11 constructs instead of custom ones.
ThreadUtil shipped a scope lock and a mutex implementation, which can be
removed since we now have these in the standard library.
This lets us clean up this header which get included everywhere (through
profiler includes).

Tested By: Angen and Stan
Differential Revision: https://code.wildfiregames.com/D1915
This was SVN commit r22344.
2019-06-06 19:30:48 +00:00
d7ff9722c6 Don't delay the pyrogenesis shutdown for 5 minutes but at most 10 seconds if the server is not responding, refs #968;
in particular Philips server not responding to SSL which became a
requirement by the client following 209bab0255 or following GDPR 32.1.a,
refs #5257 while the new backend is not ready yet.

Mark file emptied in 209bab0255 as deleted.
Add scrolling to the UserReporter window, so that the timeout error
strings that became visible following the bugfixes in b496168d0a and
c898c19735 and don't overlap with the buttons.

This was SVN commit r21900.
2018-10-09 16:27:42 +00:00
b496168d0a Fix UserReporter passing uninitialized data through the JS Interface and displaying it in the UI following 0da7e822ff if the curl connection failed.
Display a generic error message using curl_easy_strerror if the detailed
error description is unavailable.

Differential Revision: https://code.wildfiregames.com/D1625
This was SVN commit r21892.
2018-09-23 00:20:17 +00:00
27c107a448 Inform users that they are subject to the mod.io Terms and Conditions and Privacy Policy and provide links following 833c9f108c / D1029. Refs GDPR #5257.
Add link to feedback.wildfiregames.com, which demonstrates users how
their data is going to be used.

Add link buttons to the Terms dialog (refs #4583), so that users are
informed of the terms prior to becoming subject to them.
Don't link the DMCA / copyright terms of mod.io now since I found no UI
with support for 3 buttons that doesn't appear unsatisfyingly ugly.
Adds 3 button captions and 1 tooltip string.

Differential Revision: https://code.wildfiregames.com/D1627
A Comment and a relatable patch in D1601 by smiley / (-_-).

This was SVN commit r21890.
2018-09-22 16:27:49 +00:00
dd008af2f8 Write UserReport data to local logfiles, so that users can review the personal data impact without exposing the data to JS/mods, refs #5257, b3438cabd2.
Write the logfiles even if the UserReporter is disabled, so that the
assessment can be done prior to use.

This was SVN commit r21868.
2018-08-22 22:17:42 +00:00
833c9f108c mod.io support.
mod.io is a new platform for sharing mods, that 0 A.D. can make use of
in order to download mods and install them.

Based on patch by leper, numerous changes from s0600204, vladislavbelov,
Imarok, elexis, temple and myself.
Differential Revision: https://code.wildfiregames.com/D1029
This was SVN commit r21759.
2018-04-22 18:14:45 +00:00
417c84870c Actually remove trailing tabs from source/.
This was SVN commit r18991.
2016-11-23 14:09:58 +00:00
95d3612b68 Fix Profiler2 calls in UserReport.cpp, which lead to multiple Leave events being recorded without corresponding enter events. Possible fix for the linux crash of profiler2.
This was SVN commit r18426.
2016-06-23 10:01:31 +00:00
3cbe96d24c Revamp Profiler2 to make it more usable.
Features include new graphs to compare runtime of functions and runtimes
across reports, as well as new profiling functions that only profile
spikes.

This was SVN commit r18423.
2016-06-22 13:38:05 +00:00
43f358563c when saving an option to file, write only that value and not all the content of the user configDB, refs #3737
This was SVN commit r17738.
2016-02-07 11:31:23 +00:00
e06a7b37d8 Convert debug_printf to take UTF-8 strings instead of wchar_t.
This fixes the problem where passing a non-ASCII string to
debug_printf(L"%hs", s) caused vswprintf_s to fail on Linux (because it
doesn't know what encoding the char* is meant to have). Now debug
messages will remain as UTF-8 until they reach the OS.

Fixes #3021.

This was SVN commit r16332.
2015-02-14 01:45:13 +00:00
9407dbe45e Remove useless parameter from CFG_GET_VALUE.
This was SVN commit r15984.
2014-11-17 23:29:49 +00:00
5e23445339 Make ConfigDB properly thread-safe.
Replace CreateValue with SetValueString so we don't pass pointers to
internal
 ConfigDB structures around. Refs #1810.
Remove some splash screen related functions since we can achieve the
same
 with the ConfigDB functions exposed to scripts.

This was SVN commit r14437.
2013-12-29 23:56:18 +00:00
276f0a41a0 New Year's clean-up.
Throw a warning if a invalid (not present) AI is specified in a map.
Replace the last occurences of jubot with qbot.
Exclude the common siege templates from the Units Demo map.
Fix an error with flying units.
Replace CFG_GET_SYS_VAL with CFG_GET_USER_VAL and rename it to
CFG_GET_VAL to reflect its behaviour better.
Fix linker error with clang 3.2. Refs 1588.
Remove some useless includes.

This was SVN commit r13031.
2013-01-01 18:33:53 +00:00
39910affd0 Changes various urls to point to the new website and fixes some broken forum urls.
This was SVN commit r12980.
2012-12-11 23:04:03 +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
0ec4242962 Detect and fix printf signedness errors. Fixes #1086, #1087.
This was SVN commit r10846.
2012-01-01 16:43:10 +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
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
9bbda8b80b HTTP proxy discovery for Windows
This was SVN commit r8969.
2011-02-21 21:54:47 +00:00
7445342b61 wdll_ver: avoid errors while reading DLL version due to (lack of) FS redirection
UserReport: avoid windows iterator debugging warning due to invalid
operator[]

This was SVN commit r8942.
2011-02-19 19:15:00 +00:00
1c7e33b528 Remove a load of implicit CStr type conversions, since they're error-prone and can cause silent data loss.
Handle most CStr8/CStrW conversions via UTF-8 instead of effectively
assuming Latin-1.
Return UTF-8 strings from Xeromyces API.

This was SVN commit r8929.
2011-02-17 20:08:20 +00:00
0da7e822ff # Add opt-in automatic feedback system.
Add GL implementation limits to hwdetect.
Make the in-game manual support multiple text files.
Remove unnecessary instruction on how to close the manual window.
Make guitextobject.caption return the original value without stripping
formatting tags.
Remove unused non-VFS support from config system.
Support writing config files back to their original path.
Remove unnecessary user profile directory; use normal config directory.

This was SVN commit r8925.
2011-02-16 20:40:15 +00:00