From 8394bda24520c064c150c87a4d75bb91ef11cb04 Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 20 Mar 2008 00:57:54 +0000 Subject: - 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 might 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. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@963 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/UltraStar.lpr | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'Game/Code/UltraStar.lpr') 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} -- cgit v1.2.3