mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 14:45:53 +00:00
Direct log output to __android_log_print
This commit is contained in:
@@ -22,8 +22,11 @@
|
||||
* THE SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include <android/log.h>
|
||||
#include "os/os_specific.h"
|
||||
|
||||
#define LOGCAT_TAG "renderdoc"
|
||||
|
||||
typedef int Display;
|
||||
|
||||
namespace Keyboard
|
||||
@@ -79,3 +82,16 @@ string Wide2UTF8(const std::wstring &s)
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
namespace OSUtility
|
||||
{
|
||||
void WriteOutput(int channel, const char *str)
|
||||
{
|
||||
if(channel == OSUtility::Output_StdOut)
|
||||
fprintf(stdout, "%s", str);
|
||||
else if(channel == OSUtility::Output_StdErr)
|
||||
fprintf(stderr, "%s", str);
|
||||
else if(channel == OSUtility::Output_DebugMon)
|
||||
__android_log_print(ANDROID_LOG_INFO, LOGCAT_TAG, "%s", str);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -218,3 +218,14 @@ string Wide2UTF8(const std::wstring &s)
|
||||
return string(&charBuffer[0]);
|
||||
}
|
||||
};
|
||||
|
||||
namespace OSUtility
|
||||
{
|
||||
void WriteOutput(int channel, const char *str)
|
||||
{
|
||||
if(channel == OSUtility::Output_StdOut)
|
||||
fprintf(stdout, "%s", str);
|
||||
else if(channel == OSUtility::Output_StdErr)
|
||||
fprintf(stderr, "%s", str);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -314,14 +314,3 @@ string Fmt(const char *format, ...)
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
namespace OSUtility
|
||||
{
|
||||
void WriteOutput(int channel, const char *str)
|
||||
{
|
||||
if(channel == OSUtility::Output_StdOut)
|
||||
fprintf(stdout, "%s", str);
|
||||
else if(channel == OSUtility::Output_StdErr)
|
||||
fprintf(stderr, "%s", str);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user