Ejemplo n.º 1
0
void AddLogModule(void)
{
    CPath LogFilePath(g_Settings->LoadStringVal(Directory_Log).c_str(), "Project64.log");
    if (!LogFilePath.DirectoryExists())
    {
        LogFilePath.DirectoryCreate();
    }

    g_LogFile = new CTraceFileLog(LogFilePath, g_Settings->LoadDword(Debugger_AppLogFlush) != 0, CLog::Log_New, 500);
    TraceAddModule(g_LogFile);
}
Ejemplo n.º 2
0
void StartTrace(void)
{
    const char * log_dir = g_settings ? g_settings->log_dir() : NULL;
    if (log_dir == NULL || log_dir[0] == '\0')
    {
        return;
    }

    CPath LogFilePath(log_dir, "Project64-audio.log");
    if (!LogFilePath.DirectoryExists())
    {
        LogFilePath.DirectoryCreate();
    }
    g_LogFile = new CTraceFileLog(LogFilePath, g_settings->FlushLogs(), CLog::Log_New, 500);
    TraceAddModule(g_LogFile);
}
Ejemplo n.º 3
0
EXPORT jboolean CALL Java_emu_project64_jni_NativeExports_appInit(JNIEnv* env, jclass cls, jstring BaseDir)
{
    if (g_Logger == NULL)
    {
        g_Logger = new AndroidLogger();
    }
    TraceAddModule(g_Logger);

    Notify().DisplayMessage(10, "    ____               _           __  _____ __ __");
    Notify().DisplayMessage(10, "   / __ \\_________    (_)__  _____/ /_/ ___// // /");
    Notify().DisplayMessage(10, "  / /_/ / ___/ __ \\  / / _ \\/ ___/ __/ __ \\/ // /_");
    Notify().DisplayMessage(10, " / ____/ /  / /_/ / / /  __/ /__/ /_/ /_/ /__  __/");
    Notify().DisplayMessage(10, "/_/   /_/   \\____/_/ /\\___/\\___/\\__/\\____/  /_/");
    Notify().DisplayMessage(10, "                /___/");
    Notify().DisplayMessage(10, "http://www.pj64-emu.com/");
    Notify().DisplayMessage(10, stdstr_f("%s Version %s", VER_FILE_DESCRIPTION_STR, VER_FILE_VERSION_STR).c_str());
    Notify().DisplayMessage(10, "");

    if (g_JavaVM == NULL)
    {
        Notify().DisplayError("No java VM");
        return false;
    }

    const char *baseDir = env->GetStringUTFChars(BaseDir, 0);
    bool res = AppInit(&Notify(), baseDir, 0, NULL);

    env->ReleaseStringUTFChars(BaseDir, baseDir);
    if (res)
    {
        g_JavaBridge = new JavaBridge(g_JavaVM);
        g_SyncBridge = new SyncBridge(g_JavaBridge);
        g_Plugins->SetRenderWindows(g_JavaBridge, g_SyncBridge);

        JniBridegSettings = new CJniBridegSettings();

        RegisterUISettings();
        g_Settings->RegisterChangeCB(GameRunning_CPU_Running, NULL, (CSettings::SettingChangedFunc)GameCpuRunning);
    }
    else
    {
        AppCleanup();
    }
    return res;
}
Ejemplo n.º 4
0
void SetupTrace(void)
{
    if (g_LogFile != NULL)
    {
        return;
    }

#ifdef ANDROID
    if (g_AndroidLogger == NULL)
    {
        g_AndroidLogger = new AndroidLogger();
    }
    TraceAddModule(g_AndroidLogger);
#endif
#ifdef _DEBUG
    TraceSetMaxModule(MaxTraceModulePluginAudio, TraceInfo);
#else
    TraceSetMaxModule(MaxTraceModulePluginAudio, TraceError);
#endif
    TraceSetModuleName(TraceAudioInitShutdown, "AudioInitShutdown");
    TraceSetModuleName(TraceAudioInterface, "AudioInterface");
    TraceSetModuleName(TraceAudioDriver, "AudioDriver");
}