Commit Graph

8 Commits

Author SHA1 Message Date
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Andrew Rodham
4ad1b987fc Improved progress reporting in the editor
FScopedSlowTask has been refactored to better allow for nesting of slow operations. This allows us to cascade nested scopes and provide accurate feedback on slow tasks. FScopedSlowTasks now work together when nested inside sub functions. Break up long functions that contain calls to multiple nested FScopedSlowTasks with FScopedSlowTask::EnterProgressFrame().

Example Usage:
void DoSlowWork()
{
    FScopedSlowTask Progress(2.f, LOCTEXT("DoingSlowWork", "Doing Slow Work..."));
    // Optionally make this show a dialog if not already shown
    Progress.MakeDialog();

    // Indicate that we are entering a frame representing 1 unit of work
    Progress.EnterProgressFrame(1.f);

    // DoFirstThing() can follow a similar pattern of creating a scope divided into frames. These contribute to their parent's progress frame proportionately.
    DoFirstThing();

    Progress.EnterProgressFrame(1.f);
    DoSecondThing();
}

This addresses TTP#338602 - NEEDS REVIEW: Editor progress bars nearly always just show 100%, don't offer useful indication of progress

[CL 2322391 by Andrew Rodham in Main branch]
2014-10-08 04:42:34 -04:00
Michael Trepka
bbfae9357a Fixed a crash caused by FMacNativeFeedbackContextWindowController's window being released while still in use
#codereview Mark.Satterthwaite

[CL 2283038 by Michael Trepka in Main branch]
2014-09-03 11:17:05 -04:00
Mark Satterthwaite
e0606ebf7f When separating the main & game threads on OS X use custom run-loop modes so that re-entrant event handling only process the required events, more akin to Windows, to prevent problems in Slate.
#codereview michael.trepka

[CL 2277706 by Mark Satterthwaite in Main branch]
2014-08-29 11:15:12 -04:00
Mark Satterthwaite
8f351ac383 On OS X detach the game thread from the 'blessed' Cocoa main thread.
Cocoa isn't an event-polling API as UE4 expects, so previously we were subverting the NSApplication's event handling to pretend that it was. When the engine wasn't running the event loop fast enough, such as when loading where it isn't processed at all, this resulted in unresponsive windows and Spinning-Beachball-Of-Death. That isn't very satisfactory & to some users appears as if the application has crashed. To address these deficiencies without further attempts to subvert Cocoa, the game is now punted onto a separate thread where it can run its own tight-loop, leaving the main thread to handle the Cocoa event run-loop. Events are captured by delegate objects, as Cocoa requires, but dispatched and handled on the game thread which makes Cocoa appear more like other platform APIs to the higher-level UE4 code.
This can all be disabled using the MAC_SEPARATE_GAME_THREAD define in CocoaThread.cpp.
#codereview michael.trepka

[CL 2262543 by Mark Satterthwaite in Main branch]
2014-08-19 10:46:30 -04:00
Mark Satterthwaite
8a330a6cd3 Small non-unity fix for OS X.
#codereview michael.trepka

[CL 2176049 by Mark Satterthwaite in Main branch]
2014-07-08 12:39:23 -04:00
Mark Satterthwaite
c5b5f583bf Implement a proper native feedback window for OS X that provides cancellation, progress status and a disclosable output log.
#codereview michael.trepka

[CL 2123780 by Mark Satterthwaite in Main branch]
2014-07-01 15:51:16 -04:00
Ben Marsh
b4d4fe3f07 Add a Mac FFeedbackContext which shows the log window during slow tasks. Windows version displays a nice status message and progress bar, but this will do for now. Will be used to recompile out-of-date binaries on startup.
#codereview Michael.Trepka

[CL 2073573 by Ben Marsh in Main branch]
2014-05-14 18:56:27 -04:00