Refactor so GameModeBase is the runnable
This commit is contained in:
@@ -14,34 +14,31 @@ void init_wrapper(EngineWrapper* w) {
|
||||
}
|
||||
}
|
||||
|
||||
// Print text using GEngine->Add...
|
||||
void RawPrint(const char* text) {
|
||||
if (GEngine)
|
||||
{
|
||||
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, FString(text));
|
||||
}
|
||||
}
|
||||
|
||||
static TArray<FString> dprints;
|
||||
// The DPrint array. This stores the dprints
|
||||
// until they can be collected by the console implementation.
|
||||
static TArray<FString> dprint_array;
|
||||
static FCriticalSection dprint_mutex;
|
||||
|
||||
void DPrint(const FString& fs) {
|
||||
dprints.Emplace(fs);
|
||||
FScopeLock lk(&dprint_mutex);
|
||||
dprint_array.Emplace(fs);
|
||||
}
|
||||
|
||||
void DPrint(const char* msg) {
|
||||
dprints.Emplace(msg);
|
||||
FScopeLock lk(&dprint_mutex);
|
||||
dprint_array.Emplace(msg);
|
||||
}
|
||||
|
||||
void DPrintHook(const char* msg, size_t len) {
|
||||
dprints.Emplace(len, (const UTF8CHAR*)msg);
|
||||
FScopeLock lk(&dprint_mutex);
|
||||
dprint_array.Emplace(len, (const UTF8CHAR*)msg);
|
||||
}
|
||||
|
||||
const TArray<FString>& DPrintGetStored() {
|
||||
return dprints;
|
||||
}
|
||||
|
||||
void DPrintClearStored() {
|
||||
dprints.Reset();
|
||||
TArray<FString> DPrintGetStored() {
|
||||
FScopeLock lk(&dprint_mutex);
|
||||
TArray<FString> result = std::move(dprint_array);
|
||||
dprint_array.Empty();
|
||||
return result;
|
||||
}
|
||||
|
||||
void ConsoleOutput::Append(const FString& text) {
|
||||
|
||||
Reference in New Issue
Block a user