Commit Graph

63 Commits

Author SHA1 Message Date
Oliver Brakmann
64506b856a Prevent crash dialog from popping up when the game restarts
Fixes #6887
2014-11-04 21:35:56 +01:00
steelphase
beef3242b8 Disable internal Error Message
Rely on GameMonitor to display error message.
2014-10-19 11:12:58 +02:00
Paul Chote
4f44cc1969 Load assets using absolute paths. Fixes #6717. 2014-10-11 11:02:30 +13:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
Pavlos Touboulidis
b9542e0f3f Fix #5675 2014-06-20 22:54:56 +03:00
RoosterDragon
e8111e8ac6 Restart the process rather than reloading a new AppDomain. 2014-06-18 21:36:59 +01:00
RoosterDragon
52b09bdfe8 If changed settings require a restart, offer the user to do it now.
Add a dialog when closing the settings screen asking the user if they would like to restart the game now in order to apply any settings that are only applied after restarting the game. The game is reloaded in-process by spinning up a new AppDomain in order to reset state.
2014-06-18 21:36:56 +01:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
RoosterDragon
783fd8eb32 Streamline PerfSample.
- Avoid memory allocations by making PerfSample a struct, and tracking ticks manually rather than creating a Stopwatch instance.
2014-06-11 03:52:16 +01:00
RoosterDragon
a598a01108 Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
2014-06-10 11:23:55 +01:00
RoosterDragon
d1b3d77662 Changed logging in DoTimed/RunActivity to create less overhead.
- Refactored PerfTimer to use less memory.
- Avoid using the PerfTimer in highly called methods DoTimed and RunActivity, instead tracking long ticks manually to reduce overhead and avoid memory allocations.
- Added some helper methods in PerfTimer to output information when a tick takes too long.
- Changed PerfTimer logging to output the time at the start of the line, and no longer truncate output per line.
- Settings.LongTickThreshold changed from TimeSpan to float and renamed to LongTickThresholdMs.
2014-05-28 16:38:05 +01:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
Pavlos Touboulidis
df0d1360dd Give PerfTimer the ability to write only slow operations to the log
This is useful to ignore fast operations that just spam the log.

The class had to be reworked because it couldn't properly handle cases
where all of a node's children where below the threshold.

Also changed DoTimed() and RunActivity() to use PerfTimer.
2014-05-22 03:40:36 +03:00
Matthias Mailänder
187362e80e rename OpenRA.Support.Random aka XRandom to MersenneTwister 2014-05-18 21:53:21 +02:00
Matthias Mailänder
59ace5d01b new shorthand Exts.(Try)ParseIntegerInvariant 2014-05-13 14:16:41 +02:00
Matthias Mailänder
b19d286f56 parse with NumberFormatInfo.InvariantInfo everywhere
closes #5240
2014-05-06 18:31:48 +02:00
Paul Chote
3965535f3f Remove Windows.Forms dependencies from game and utility. Fixes #4348. 2014-05-04 09:37:25 +12:00
Paul Chote
fe6831a095 Move winforms crash dialog into an external helper. 2014-05-04 09:37:25 +12:00
Pavlos Touboulidis
c28faffa45 Remove custom Stopwatch wrapper
Remove the redirection (that doesn't offer any new functionality)
and replace it with the familiar System.Diagnostics.Stopwatch.
2014-04-26 23:58:18 +03:00
Pavlos Touboulidis
e6dddf3704 Style fixes 2014-04-26 02:05:06 +03:00
Pavlos Touboulidis
603dd1d866 Style fixes 2014-04-24 13:46:06 +03:00
Pavlos Touboulidis
c17f706772 Prettier PerfTimer output 2014-04-23 16:52:52 +03:00
Pavlos Touboulidis
36a660385c Fix OpenRA.Lint throwing because "perf" log channel does not exist
Slightly modified the Log class to allow dummy channels that don't
write anywhere, then use it on Lint because map loading writes to
the "perf" channel.
2014-04-23 13:22:14 +03:00
Pavlos Touboulidis
c44d73d581 Improve PerfTimer output 2014-04-23 03:42:27 +03:00
Pavlos Touboulidis
60732bd9bd Repurpose unused Timer.cs and add some loading perf metrics 2014-04-23 01:58:30 +03:00
Pavlos Touboulidis
035834978d Make Stopwatch.ElapsedTime() a property and TimeSpan 2014-04-23 00:56:07 +03:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
6d6d1e230b Remove runtime mod merging. Closes #3421. 2013-11-15 09:54:42 +13:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
Paul Chote
6aee253c94 Fix a NRE in the exception handler. 2013-11-09 15:24:58 +13:00
Matthias Mailänder
70ba7fe5f6 added OpenRA, OS and .NET/Mono runtime version to exception.log 2013-10-17 20:39:41 +02:00
ScottNZ
b654b65d8d Close game interface before showing crash form and don't show it at all on dedicated servers. 2013-08-29 01:30:29 +12:00
ScottNZ
7f67b567f9 Add Fatal Error dialog 2013-08-18 14:58:07 +12:00
Scott_NZ
da0b4ecd3b Log unhandled exceptions 2013-05-02 23:45:05 +12:00
James Dunne
e49a439c79 You win chrisf =P 2012-07-03 19:05:46 -05:00
James Dunne
b2e9085371 More detailed exception reporting on crash. 2012-07-03 15:37:37 -05:00
Chris Forbes
325ec41182 remove dead functions from Arguments.cs 2011-10-18 21:58:17 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Paul Chote
be79529d9e Perf debug 2011-05-21 17:26:15 +12:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Chris Forbes
c3c16c4fd8 remove some duplication in Utility 2011-02-05 11:54:31 +13:00
Chris Forbes
cf17bc7e5c clean up perf graph a bit 2010-12-31 20:31:57 +13:00
Paul Chote
e81a1f78a4 Fix visibility that mono 2.8 happily ignores. 2010-11-27 22:39:50 +13:00
Bob
0d9cf63dd2 move Mobile et al into Mods/ 2010-10-22 11:31:13 +13:00
Bob
c0d0636e08 store traits differently (index on trait class rather than actor) 2010-08-26 19:32:59 +12:00
Paul Chote
46d0ce89e9 Fix silly naming conventions 2010-08-24 19:53:05 +12:00
Paul Chote
cb3f6435ad Kill broken log uploading 2010-08-18 20:45:30 +12:00
alzeih
b8a335a88f put back in --just-die 2010-07-20 21:38:21 +12:00
alzeih
f92b59e6db Developer Mode (pchote: amended) 2010-07-20 21:20:03 +12:00