aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/UltraStar.lpr19
1 files changed, 18 insertions, 1 deletions
diff --git a/Game/Code/UltraStar.lpr b/Game/Code/UltraStar.lpr
index c4c1e4ae..ab4a6534 100644
--- a/Game/Code/UltraStar.lpr
+++ b/Game/Code/UltraStar.lpr
@@ -8,8 +8,25 @@ uses
{$ifdef unix} // http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial
cthreads, // THIS MUST be the first used unit !!
{$endif}
+ {$ifdef MSWINDOWS} // do not initialize the widgets in linux -> see below
{$ifdef LCL}
- Interfaces, // Initialize Lazarus LCL (necessary for usage of LCLIntf, etc.)
+ Interfaces, // Initialize Lazarus LCL (necessary for usage of LCLIntf, etc.)
+ // WARNING: in linux (with the gtk2 interface) this will change the locale
+ // settings like LC_NUMERIC (which cannot be reverted, can it? At least I have not managed to do so.).
+ // As a result external libs like projectM might not be able to parse
+ // floating-point values anymore (because ',' might be used as decimal-seperator in atof() or strtod()).
+ // As a result, projectM does not work anymore and crashes because of access violations.
+ // Not initializing Interfaces crashes USDX when widgets should be shown, as done with
+ // MessageBox(). In addition LCL assigns itself as a Signal-handler for almost every
+ // exception (FPE, SEGV, etc.) and wants to show a message-box with some info on
+ // the exception that occured. It will crash a second time because of the missing
+ // widget-set binding (error in winapi.pp).
+ //
+ // Removing the lazarus widget stuff seems to be the only solution but even if just
+ // the LCLIntf unit is included, lazarus catches signals and tries to show the exception-info.
+ // -> So we have to remove all the lazarus stuff except LResources (hope this doesn't influence the signal-handler too)
+ // We can leave the windows-only LCL-stuff in DirWatch and the Midi-classes.
+ {$endif}
{$endif}
{$I UltraStar.dpr}