Commit Graph

19 Commits (c785a0e955478dcad867af55bcd44111a718aefd)

Author SHA1 Message Date
Nat Goodspeed 464a0df4c1 DRTVWR-418: Unify control flow through LLAppViewer across platforms.
The LLApp API used to consist of init(), mainLoop(), cleanup() methods. This
makes sense -- but on Mac that structure was being subverted. The method
called mainLoop() was in fact being called once per frame. There was
initialization code in the method, which (on Mac) needed to be skipped with an
already-initialized bool. There was a 'while' loop which (on Mac) needed to be
turned into an 'if' instead so the method would return after every frame.

Rename LLApp::mainLoop() to frame(). Propagate through subclasses LLAppViewer
and LLCrashLogger. Document the fact that frame() returns true to mean "done."
(This was always the case, but had to be inferred from the code.)

Rename the Mac Objective-C function mainLoop to oneFrame. Rename the C++ free
function it calls from runMainLoop() to pumpMainLoop(). Add comments to
llappdelegate-objc.mm explaining (inferred) control flow.

Change the Linux viewer main() and the Windows viewer WINMAIN() from a single
LLAppViewer::mainLoop() call to repeatedly call frame() until it returns true.

Move initialization code from the top of LLAppViewer::frame() to the init()
method, where it more properly belongs. Remove corresponding
mMainLoopInitialized flag (and all references) from LLAppViewer.

Remove 'while (! LLApp::isExiting())' (or on Mac, 'if (! LLApp::isExiting())')
from LLAppViewer::frame() -- thus unindenting the whole body of the 'while'
and causing many lines of apparent change. (Apologies to reviewers.)

There are four LLApp states: APP_STATUS_RUNNING, APP_STATUS_QUITTING,
APP_STATUS_STOPPED and APP_STATUS_ERROR. Change LLAppViewer::frame() return
value from (isExiting()) (QUITTING or ERROR) to (! isRunning()). I do not know
under what circumstances the state might transition to STOPPED during a
frame() call, but I'm quite sure that if it does, we don't want to call
frame() again. We only want a subsequent call if the state is RUNNING.

Also rename mainLoop() method in LLCrashLogger subclasses
LLCrashLoggerWindows, LLCrashLoggerMac, LLCrashLoggerLinux. Of course it's
completely up to the frame() method whether to yield control; none of those in
fact do. Honor protocol by returning true (frame() is done), even though each
one's main() caller ignores the return value.

In fact LLCrashLoggerWindows::mainLoop() wasn't using the return protocol
correctly anyway, returning wParam or 0 or 1 -- possibly because the return
protocol was never explicitly documented. It should always return true: "I'm
done, don't call me again."
2016-06-30 16:51:50 -04:00
Oz Linden 5822fb00b6 merge DRTVWR-398 build cleanup fixes 2016-03-07 12:41:11 -05:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Jonathan Yap 44f5d73209 STORM-2086 Convert old style llinfos and llwarns to new format 2014-11-20 16:25:11 -05:00
Richard Linden 98aabdc176 merge with release 2014-04-07 19:09:40 -07:00
Aura Linden 6809348125 Creating a cleaner branch 2013-12-03 17:06:06 -08:00
Richard Linden d83c51a4e1 BUILDFIX: converted platform-specific files over to new LL_INFOS, etc macros 2013-08-14 21:58:30 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Aaron Stone 42daa3497b STORM-1482 The Viewer shouldn't overwrite the crash behavior settings, some cleanups to the crash reporters, and the ability to use --set GroupName.SettingName to set parameters outside of the (default) Global settings group. 2011-07-12 15:48:02 -07:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Aaron Brashears e3cf284388 Result of svn merge -r107256:107258 svn+ssh://svn/svn/user/phoenix/license_2009_merge into trunk. QAR-1165 2009-01-08 00:05:06 +00:00
Kyle Machulis 2e7c0d973e svn merge -r74104:74124 svn+ssh://svn/svn/linden/branches/crash-logger-cleanup-merge-6 2007-11-20 23:42:48 +00:00
Aaron Brashears 5595a99623 Result of svn merge -r71162:71205 svn+ssh://svn/svn/linden/branches/new-license into release. only changes files which are not deployed or the comments section of code. 2007-10-04 23:19:43 +00:00
Aaron Brashears 4942a7b779 Result of svn merge -r70873:71086 svn+ssh://svn/svn/linden/branches/enable-exceptions into release. 2007-10-04 16:31:48 +00:00
Don Kjer 9746cf5310 EFFECTIVE MERGE: svn merge -r 65485:66133 svn+ssh://svn/svn/linden/branches/maintenance into release
This includes fixes to the maintenance-r66133 branch, and sync'ing up with release@r66392

ACTUAL MERGE: svn merge -r 66394:66435 svn+ssh://svn/svn/linden/branches/release-r66392 into release
EQUIVALENT TO: svn merge -r 65485:66434 svn+ssh://svn/svn/linden/branches/maintenance-r66133 into release (plus branch sync'ing)
2007-07-26 01:22:23 +00:00
Don Kjer d373dcc7cb svn merge -r 64548:64837 svn+ssh://svn/svn/linden/branches/maintenance into release
* WARNING *:  maintenance r64837 is not the last rev to use in the next merge. use r65269
2007-07-20 20:38:05 +00:00
Steven Bennetts ad94bca0d2 merge -r 56696:57082 Branch_1-13-2 2007-01-24 20:21:23 +00:00
Aaron Brashears 4617a37edf corrected, removed, and updated comments throughout the code to be more useful. no code changes. SL-13762 2007-01-03 21:05:41 +00:00
James Cook 420b91db29 Print done when done. 2007-01-02 08:33:20 +00:00