mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Logging improvements
This commit is contained in:
1 parent
6bdaf7caee
commit
b46566adc2
4 files changed
+12
-11
No files matched your search
@@ -54,7 +54,7 @@ void GLRenderManager::ThreadStart(Draw::DrawContext *draw) {
|
||||
renderThreadId = std::this_thread::get_id();
|
||||
|
||||
if (newInflightFrames_ != -1) {
|
||||
INFO_LOG(Log::G3D, "Updating inflight frames to %d", newInflightFrames_);
|
||||
INFO_LOG(Log::G3D, "OpenGL: Updating inflight frames to %d", newInflightFrames_);
|
||||
inflightFrames_ = newInflightFrames_;
|
||||
newInflightFrames_ = -1;
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ bool VulkanRenderManager::CreateBackbuffers() {
|
||||
curHeightRaw_ = -1;
|
||||
|
||||
if (newInflightFrames_ != -1) {
|
||||
INFO_LOG(Log::G3D, "Updating inflight frames to %d", newInflightFrames_);
|
||||
INFO_LOG(Log::G3D, "Vulkan: Updating inflight frames to %d", newInflightFrames_);
|
||||
vulkan_->UpdateInflightFrames(newInflightFrames_);
|
||||
newInflightFrames_ = -1;
|
||||
}
|
||||
|
||||
@@ -289,6 +289,7 @@ static ShaderModule *GenerateFShader(DrawContext *draw, FragmentShaderPreset pre
|
||||
}
|
||||
|
||||
bool DrawContext::CreatePresets() {
|
||||
INFO_LOG(Log::G3D, "Creating thin3d preset shaders...");
|
||||
bool tintSupported = !bugs_.Has(Bugs::RASPBERRY_SHADER_COMP_HANG);
|
||||
|
||||
for (int i = 0; i < VS_MAX_PRESET; i++) {
|
||||
|
||||
@@ -58,14 +58,6 @@ void SetupCallbacks(AllowedCallback allowed, MessageCallback message) {
|
||||
}
|
||||
|
||||
void ReportMessage(const char *message, ...) {
|
||||
if (!allowedCallback || !messageCallback) {
|
||||
ERROR_LOG(Log::System, "Reporting not initialized, skipping: %s", message);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!allowedCallback())
|
||||
return;
|
||||
|
||||
const int MESSAGE_BUFFER_SIZE = 65536;
|
||||
char *temp = new char [MESSAGE_BUFFER_SIZE];
|
||||
|
||||
@@ -75,6 +67,14 @@ void ReportMessage(const char *message, ...) {
|
||||
temp[MESSAGE_BUFFER_SIZE - 1] = '\0';
|
||||
va_end(args);
|
||||
|
||||
if (!allowedCallback || !messageCallback) {
|
||||
ERROR_LOG(Log::System, "Reporting not initialized, skipping: %s", temp);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!allowedCallback())
|
||||
return;
|
||||
|
||||
messageCallback(message, temp);
|
||||
|
||||
delete[] temp;
|
||||
@@ -82,7 +82,7 @@ void ReportMessage(const char *message, ...) {
|
||||
|
||||
void ReportMessageFormatted(const char *message, const char *formatted) {
|
||||
if (!allowedCallback || !messageCallback) {
|
||||
ERROR_LOG(Log::System, "Reporting not initialized, skipping: %s", message);
|
||||
ERROR_LOG(Log::System, "Reporting not initialized, skipping: %s", formatted);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user