[Android] Add patreon settings
This commit is contained in:
parent
59000ff8be
commit
2fa7af2505
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
|
@ -44,8 +44,15 @@
|
|||
<string name="advanced_screen_title">Advanced</string>
|
||||
<string name="reset_summary">Restore default settings</string>
|
||||
<string name="reset_title">Reset</string>
|
||||
<string name="preferences">Settings</string>
|
||||
<string name="patreon_title">Patreon</string>
|
||||
<string name="patreon_summary">Support Project64 on Patreon</string>
|
||||
<string name="patreon_link_title">Project64 on Patreon</string>
|
||||
<string name="patreon_link_summary">Click here to support Project64 on Patreon</string>
|
||||
<string name="patreon_email_title">Email address on Patreon</string>
|
||||
<string name="patreon_email_summary">What email address using on patreon</string>
|
||||
<string name="patreon_email_dialogTitle">Enter your email address on Patreon</string>
|
||||
<string name="settings_title">Settings</string>
|
||||
<string name="preferences">preferences</string>
|
||||
<string name="displayFps_title">Framerate</string>
|
||||
<string name="displayFps_summary">Display FPS on screen</string>
|
||||
<string name="audioEnabled_title">Enable Audio</string>
|
||||
|
@ -160,7 +167,7 @@
|
|||
<!-- Confirmation Dialogs -->
|
||||
<string name="confirmResetGame_title">Reset game?</string>
|
||||
<string name="confirmResetGame_message">The game will go back to a clear state, all progress made will be lost.</string>
|
||||
<string name="GetSaveSupport_title">Save Support</string>
|
||||
<string name="SupportProject64_title">Save Support</string>
|
||||
<string name="GetSaveSupport_message">Save support is a one time purchase and the only purchase in Project64.\n\nProject64 may not be perfect and making this as an upgrade it allows you to play and test the emulator before you have to spend any money.\n\nThis is also a good way for you to support and give back to the creation of the emulator..</string>
|
||||
<string name="GetSaveSupport_OkButton">Purchase</string>
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<Preference android:title="@string/patreon_link_title" android:summary="@string/patreon_link_summary" >
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:data="https://www.patreon.com/bePatron?u=841905" />
|
||||
</Preference>
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue=""
|
||||
android:dialogTitle="@string/patreon_email_dialogTitle"
|
||||
android:inputType="textUri"
|
||||
android:key="Patreon_email"
|
||||
android:maxLines="1"
|
||||
android:summary="@string/patreon_email_summary"
|
||||
android:title="@string/patreon_email_title"
|
||||
android:persistent="true" />
|
||||
|
||||
</PreferenceScreen>
|
|
@ -35,6 +35,12 @@
|
|||
android:key="settings_advanced"
|
||||
android:icon="@drawable/ic_debug"
|
||||
/>
|
||||
<Preference
|
||||
android:summary="@string/patreon_summary"
|
||||
android:title="@string/patreon_title"
|
||||
android:key="settings_patreon"
|
||||
android:icon="@drawable/ic_patreon"
|
||||
/>
|
||||
<Preference
|
||||
android:summary="@string/reset_summary"
|
||||
android:title="@string/reset_title"
|
||||
|
|
|
@ -23,6 +23,12 @@
|
|||
/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/Other" >
|
||||
<Preference
|
||||
android:summary="@string/patreon_summary"
|
||||
android:title="@string/patreon_title"
|
||||
android:key="settings_patreon"
|
||||
android:icon="@drawable/ic_patreon"
|
||||
/>
|
||||
<Preference
|
||||
android:summary="@string/reset_summary"
|
||||
android:title="@string/reset_title"
|
||||
|
|
|
@ -101,7 +101,6 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
|
||||
// The IAB helper object
|
||||
IabHelper mIabHelper;
|
||||
private boolean mHasSaveSupport = false;
|
||||
private boolean mPj64Supporter = false;
|
||||
|
||||
// Provides purchase notification while this app is running
|
||||
|
@ -165,7 +164,6 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
// Oh noes, there was a problem.
|
||||
Log.d("GalleryActivity", "Problem setting up in-app billing: " + result);
|
||||
// complain("Problem setting up in-app billing: " + result);
|
||||
mHasSaveSupport = true;
|
||||
mPj64Supporter = true;
|
||||
return;
|
||||
}
|
||||
|
@ -357,48 +355,6 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
}
|
||||
};
|
||||
|
||||
IabHelper.OnIabPurchaseFinishedListener mPurchaseFinishedListener = new IabHelper.OnIabPurchaseFinishedListener()
|
||||
{
|
||||
public void onIabPurchaseFinished(IabResult result, Purchase purchase)
|
||||
{
|
||||
Log.d("GalleryActivity", "Purchase finished: " + result + ", purchase: " + purchase);
|
||||
// if we were disposed of in the meantime, quit.
|
||||
if (mIabHelper == null) return;
|
||||
|
||||
if (result.isFailure())
|
||||
{
|
||||
Log.e("GalleryActivity", "**** Purcahse Error: " + result);
|
||||
alert("Save Support Upgrade failed\n\n" + result.getMessage());
|
||||
setWaitScreen(false);
|
||||
ShowSupportWindow();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("GalleryActivity", "Purchase successful.");
|
||||
|
||||
if (purchase.getSku().equals(SKU_SAVESUPPORT))
|
||||
{
|
||||
// bought the premium upgrade!
|
||||
Log.d("GalleryActivity", "Purchase is save support. Congratulating user.");
|
||||
alert("Thank you for upgrading to have save support!");
|
||||
mHasSaveSupport = true;
|
||||
setWaitScreen(false);
|
||||
}
|
||||
|
||||
if (purchase.getSku().equals(SKU_PJ64SUPPORTOR_2) ||
|
||||
purchase.getSku().equals(SKU_PJ64SUPPORTOR_5) ||
|
||||
purchase.getSku().equals(SKU_PJ64SUPPORTOR_8) ||
|
||||
purchase.getSku().equals(SKU_PJ64SUPPORTOR_10))
|
||||
{
|
||||
// bought the premium upgrade!
|
||||
Log.d("GalleryActivity", "Purchase is project64 support. Congratulating user.");
|
||||
alert("Thank you for supporting Project64!");
|
||||
mPj64Supporter = true;
|
||||
setWaitScreen(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void alert(String message)
|
||||
{
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||
|
@ -817,29 +773,8 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
}
|
||||
}
|
||||
|
||||
public void PurcahseProject64Support(Activity activity, String sku)
|
||||
{
|
||||
setWaitScreen(true);
|
||||
//Purchase save support
|
||||
try
|
||||
{
|
||||
String payload = NativeExports.appVersion();
|
||||
mIabHelper.launchPurchaseFlow(activity, sku, RC_REQUEST, mPurchaseFinishedListener, payload);
|
||||
}
|
||||
catch (IabAsyncInProgressException e)
|
||||
{
|
||||
setWaitScreen(false);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean ShouldShowSupportWindow()
|
||||
{
|
||||
Log.d("GalleryActivity", "ShowSupportWindow mHasSaveSupport = " + mHasSaveSupport);
|
||||
if (mHasSaveSupport)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.d("GalleryActivity", "ShowSupportWindow mPj64Supporter = " + mPj64Supporter);
|
||||
if (mPj64Supporter)
|
||||
{
|
||||
|
@ -875,7 +810,7 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
final Activity activity = this;
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(getText(R.string.GetSaveSupport_title));
|
||||
builder.setTitle(getText(R.string.SupportProject64_title));
|
||||
builder.setMessage(getText(R.string.GetSaveSupport_message));
|
||||
builder.setNeutralButton("Not now", null);
|
||||
builder.setNegativeButton("Support Project64", null);
|
||||
|
@ -897,17 +832,6 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
setWaitScreen(true);
|
||||
//Purchase save support
|
||||
try
|
||||
{
|
||||
String payload = NativeExports.appVersion();
|
||||
mIabHelper.launchPurchaseFlow(activity, SKU_SAVESUPPORT, RC_REQUEST, mPurchaseFinishedListener, payload);
|
||||
}
|
||||
catch (IabAsyncInProgressException e)
|
||||
{
|
||||
setWaitScreen(false);
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -34,6 +34,7 @@ public enum UISettingID
|
|||
SupportWindow_AlwaysShow,
|
||||
SupportWindow_ShowingSupportWindow,
|
||||
SupportWindow_RunCount,
|
||||
SupportWindow_PatreonEmail,
|
||||
|
||||
//Game Settings
|
||||
Game_RunCount,
|
||||
|
|
|
@ -94,6 +94,8 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat
|
|||
|
||||
@Override
|
||||
public boolean onPreferenceTreeClick(Preference preference)
|
||||
{
|
||||
if (preference.getKey() != null)
|
||||
{
|
||||
if (preference.getKey().equals("settings_input"))
|
||||
{
|
||||
|
@ -121,6 +123,10 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat
|
|||
{
|
||||
loadFragment(new AudioFragment());
|
||||
}
|
||||
else if (preference.getKey().equals("settings_patreon"))
|
||||
{
|
||||
loadFragment(new PatreonFragment());
|
||||
}
|
||||
else if (preference.getKey().equals("settings_advanced"))
|
||||
{
|
||||
loadFragment(new AdvancedFragment());
|
||||
|
@ -162,6 +168,11 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat
|
|||
{
|
||||
return super.onPreferenceTreeClick(preference);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.onPreferenceTreeClick(preference);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/****************************************************************************
|
||||
* *
|
||||
* Project64 - A Nintendo 64 emulator. *
|
||||
* http://www.pj64-emu.com/ *
|
||||
* Copyright (C) 2012 Project64. All rights reserved. *
|
||||
* *
|
||||
* License: *
|
||||
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
||||
* *
|
||||
****************************************************************************/
|
||||
package emu.project64.settings;
|
||||
|
||||
import emu.project64.R;
|
||||
|
||||
public class PatreonFragment extends BaseSettingsFragment
|
||||
{
|
||||
@Override
|
||||
protected int getXml()
|
||||
{
|
||||
return R.xml.setting_patreon;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getTitleId()
|
||||
{
|
||||
return R.string.patreon_title;
|
||||
}
|
||||
}
|
|
@ -55,6 +55,7 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
|
|||
sharedPrefs.edit().clear()
|
||||
.putInt("touchscreenScale",NativeExports.UISettingsLoadDword(UISettingID.TouchScreen_ButtonScale.getValue()))
|
||||
.putString("touchscreenLayout",NativeExports.UISettingsLoadString(UISettingID.TouchScreen_Layout.getValue()))
|
||||
.putString("Patreon_email",NativeExports.UISettingsLoadString(UISettingID.SupportWindow_PatreonEmail.getValue()))
|
||||
.putBoolean("audio_Enabled",NativeExports.SettingsLoadBool(SettingsID.Plugin_EnableAudio.getValue()))
|
||||
.putBoolean("PreAllocSyncMem",NativeExports.SettingsLoadBool(SettingsID.Setting_PreAllocSyncMem.getValue()))
|
||||
.putBoolean("ReducedSyncMem",NativeExports.SettingsLoadBool(SettingsID.Setting_ReducedSyncMem.getValue()))
|
||||
|
@ -140,6 +141,7 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
|
|||
}
|
||||
else if (key.equals("touchscreenScale")) { NativeExports.UISettingsSaveDword(UISettingID.TouchScreen_ButtonScale.getValue(), sharedPreferences.getInt(key, 100)); }
|
||||
else if (key.equals("touchscreenLayout")) { NativeExports.UISettingsSaveString(UISettingID.TouchScreen_Layout.getValue(), sharedPreferences.getString(key, "Analog")); }
|
||||
else if (key.equals("Patreon_email")) { NativeExports.UISettingsSaveString(UISettingID.SupportWindow_PatreonEmail.getValue(), sharedPreferences.getString(key, "")); }
|
||||
else if (key.equals("audio_Enabled")) { NativeExports.SettingsSaveBool(SettingsID.Plugin_EnableAudio.getValue(), sharedPreferences.getBoolean(key,false)); }
|
||||
else if (key.equals("Plugin_ForceGfxReset")) { NativeExports.SettingsSaveBool(SettingsID.Plugin_ForceGfxReset.getValue(), sharedPreferences.getBoolean(key,false)); }
|
||||
else if (key.equals("PreAllocSyncMem")) { NativeExports.SettingsSaveBool(SettingsID.Setting_PreAllocSyncMem.getValue(), sharedPreferences.getBoolean(key,false)); }
|
||||
|
|
|
@ -31,6 +31,7 @@ void RegisterUISettings(void)
|
|||
g_Settings->AddHandler((SettingID)(FirstUISettings + SupportWindow_AlwaysShow), new CSettingTypeApplication("Support Project64", "Always Show", false));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + SupportWindow_ShowingSupportWindow), new CSettingTypeApplication("Support Project64", "Showing Support Window", false));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + SupportWindow_RunCount), new CSettingTypeApplication("Support Project64", "Run Count", (uint32_t)0));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + SupportWindow_PatreonEmail), new CSettingTypeApplication("Support Project64", "Patreon Email", ""));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Game_RunCount), new CSettingTypeGame("Run Count", (uint32_t)0));
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ enum UISettingID
|
|||
SupportWindow_AlwaysShow,
|
||||
SupportWindow_ShowingSupportWindow,
|
||||
SupportWindow_RunCount,
|
||||
SupportWindow_PatreonEmail,
|
||||
|
||||
//Game Settings
|
||||
Game_RunCount,
|
||||
|
|
|
@ -51,13 +51,13 @@ class AndroidLogger : public CTraceModule
|
|||
{
|
||||
switch (severity)
|
||||
{
|
||||
case TraceError: __android_log_print(ANDROID_LOG_ERROR, TraceModule(module), "%05d: %s: %s",CThread::GetCurrentThreadId(),function,Message); break;
|
||||
case TraceWarning: __android_log_print(ANDROID_LOG_WARN, TraceModule(module), "%05d: %s: %s",CThread::GetCurrentThreadId(),function,Message); break;
|
||||
case TraceNotice: __android_log_print(ANDROID_LOG_INFO, TraceModule(module), "%05d: %s: %s",CThread::GetCurrentThreadId(),function,Message); break;
|
||||
case TraceInfo: __android_log_print(ANDROID_LOG_INFO, TraceModule(module), "%05d: %s: %s",CThread::GetCurrentThreadId(),function,Message); break;
|
||||
case TraceDebug: __android_log_print(ANDROID_LOG_DEBUG, TraceModule(module), "%05d: %s: %s",CThread::GetCurrentThreadId(),function,Message); break;
|
||||
case TraceVerbose: __android_log_print(ANDROID_LOG_VERBOSE, TraceModule(module), "%05d: %s: %s",CThread::GetCurrentThreadId(),function,Message); break;
|
||||
default: __android_log_print(ANDROID_LOG_UNKNOWN, TraceModule(module), "%05d: %s: %s",CThread::GetCurrentThreadId(),function,Message); break;
|
||||
case TraceError: __android_log_print(ANDROID_LOG_ERROR, TraceModule(module), "%05d: %s: %s", CThread::GetCurrentThreadId(), function, Message); break;
|
||||
case TraceWarning: __android_log_print(ANDROID_LOG_WARN, TraceModule(module), "%05d: %s: %s", CThread::GetCurrentThreadId(), function, Message); break;
|
||||
case TraceNotice: __android_log_print(ANDROID_LOG_INFO, TraceModule(module), "%05d: %s: %s", CThread::GetCurrentThreadId(), function, Message); break;
|
||||
case TraceInfo: __android_log_print(ANDROID_LOG_INFO, TraceModule(module), "%05d: %s: %s", CThread::GetCurrentThreadId(), function, Message); break;
|
||||
case TraceDebug: __android_log_print(ANDROID_LOG_DEBUG, TraceModule(module), "%05d: %s: %s", CThread::GetCurrentThreadId(), function, Message); break;
|
||||
case TraceVerbose: __android_log_print(ANDROID_LOG_VERBOSE, TraceModule(module), "%05d: %s: %s", CThread::GetCurrentThreadId(), function, Message); break;
|
||||
default: __android_log_print(ANDROID_LOG_UNKNOWN, TraceModule(module), "%05d: %s: %s", CThread::GetCurrentThreadId(), function, Message); break;
|
||||
}
|
||||
}
|
||||
void FlushTrace(void)
|
||||
|
@ -130,7 +130,7 @@ static void watch_uninstall(const char *baseDir)
|
|||
pjutil::Sleep(2000);
|
||||
__android_log_print(ANDROID_LOG_INFO, "watch_uninstall", "Sleep Done");
|
||||
|
||||
__android_log_print(ANDROID_LOG_INFO, "watch_uninstall", "TestDir.DirectoryExists() = %s", TestDir.DirectoryExists() ? "yes": "no");
|
||||
__android_log_print(ANDROID_LOG_INFO, "watch_uninstall", "TestDir.DirectoryExists() = %s", TestDir.DirectoryExists() ? "yes" : "no");
|
||||
if (!TestDir.DirectoryExists())
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_INFO, "watch_uninstall", "exit loop");
|
||||
|
@ -149,7 +149,7 @@ EXPORT jint CALL JNI_OnLoad(JavaVM* vm, void* reserved)
|
|||
__android_log_print(ANDROID_LOG_INFO, "jniBridge", "JNI_OnLoad called");
|
||||
g_JavaVM = vm;
|
||||
JNIEnv *env;
|
||||
if (g_JavaVM->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK)
|
||||
if (g_JavaVM->GetEnv((void**)&env, JNI_VERSION_1_4) != JNI_OK)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_ERROR, "jniBridge", "Failed to get the environment using GetEnv()");
|
||||
return -1;
|
||||
|
@ -180,7 +180,7 @@ void UISettingsSaveStringIndex(UISettingID Type, int32_t index, const std::strin
|
|||
void AddRecentRom(const char * ImagePath)
|
||||
{
|
||||
if (ImagePath == NULL) { return; }
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Start (ImagePath: %s)",ImagePath);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Start (ImagePath: %s)", ImagePath);
|
||||
|
||||
//Get Information about the stored rom list
|
||||
size_t MaxRememberedFiles = UISettingsLoadDword(File_RecentGameFileCount);
|
||||
|
@ -340,7 +340,7 @@ EXPORT jstring CALL Java_emu_project64_jni_NativeExports_appVersion(JNIEnv* env,
|
|||
|
||||
EXPORT void CALL Java_emu_project64_jni_NativeExports_SettingsSaveBool(JNIEnv* env, jclass cls, int Type, jboolean Value)
|
||||
{
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving %d value: %s",Type,Value ? "true" : "false");
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving %d value: %s", Type, Value ? "true" : "false");
|
||||
g_Settings->SaveBool((SettingID)Type, Value);
|
||||
CSettings::FlushSettings(g_Settings);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saved");
|
||||
|
@ -357,7 +357,7 @@ EXPORT void CALL Java_emu_project64_jni_NativeExports_SettingsSaveDword(JNIEnv*
|
|||
EXPORT void CALL Java_emu_project64_jni_NativeExports_SettingsSaveString(JNIEnv* env, jclass cls, int Type, jstring Buffer)
|
||||
{
|
||||
const char *value = env->GetStringUTFChars(Buffer, 0);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving %d value: %s",Type,value);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving %d value: %s", Type, value);
|
||||
g_Settings->SaveString((SettingID)Type, value);
|
||||
CSettings::FlushSettings(g_Settings);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saved");
|
||||
|
@ -399,7 +399,7 @@ EXPORT void CALL Java_emu_project64_jni_NativeExports_LoadRomList(JNIEnv* env, j
|
|||
EXPORT void CALL Java_emu_project64_jni_NativeExports_LoadGame(JNIEnv* env, jclass cls, jstring FileLoc)
|
||||
{
|
||||
const char *fileLoc = env->GetStringUTFChars(FileLoc, 0);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "FileLoc: %s",fileLoc);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "FileLoc: %s", fileLoc);
|
||||
CN64System::LoadFileImage(fileLoc);
|
||||
env->ReleaseStringUTFChars(FileLoc, fileLoc);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Image loaded");
|
||||
|
@ -416,8 +416,8 @@ EXPORT void CALL Java_emu_project64_jni_NativeExports_RefreshRomDir(JNIEnv* env,
|
|||
{
|
||||
const char *romDir = env->GetStringUTFChars(RomDir, 0);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "romDir = %s Recursive = %s", romDir, Recursive ? "true" : "false");
|
||||
g_Settings->SaveString(RomList_GameDir,romDir);
|
||||
g_Settings->SaveBool(RomList_GameDirRecursive,Recursive);
|
||||
g_Settings->SaveString(RomList_GameDir, romDir);
|
||||
g_Settings->SaveBool(RomList_GameDirRecursive, Recursive);
|
||||
env->ReleaseStringUTFChars(RomDir, romDir);
|
||||
|
||||
if (g_JavaRomList == NULL)
|
||||
|
@ -431,11 +431,15 @@ EXPORT void CALL Java_emu_project64_jni_NativeExports_RefreshRomDir(JNIEnv* env,
|
|||
|
||||
EXPORT void CALL Java_emu_project64_jni_NativeExports_ExternalEvent(JNIEnv* env, jclass cls, int Type)
|
||||
{
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Start (Type: %d)",Type);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Start (Type: %d)", Type);
|
||||
if (g_BaseSystem)
|
||||
{
|
||||
g_BaseSystem->ExternalEvent((SystemEvent)Type);
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteTrace(TraceUserInterface, TraceWarning, "g_BaseSystem == NULL");
|
||||
}
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Done");
|
||||
}
|
||||
|
||||
|
@ -531,7 +535,7 @@ EXPORT void CALL Java_emu_project64_jni_NativeExports_onSurfaceChanged(JNIEnv *
|
|||
CGfxPlugin * GfxPlugin = g_BaseSystem->GetPlugins()->Gfx();
|
||||
if (GfxPlugin->SurfaceChanged != NULL)
|
||||
{
|
||||
GfxPlugin->SurfaceChanged(width,height);
|
||||
GfxPlugin->SurfaceChanged(width, height);
|
||||
}
|
||||
}
|
||||
if (g_SyncSystem != NULL && g_SyncSystem->GetPlugins() != NULL && g_SyncSystem->GetPlugins()->Gfx() != NULL)
|
||||
|
@ -539,7 +543,7 @@ EXPORT void CALL Java_emu_project64_jni_NativeExports_onSurfaceChanged(JNIEnv *
|
|||
CGfxPlugin * GfxPlugin = g_SyncSystem->GetPlugins()->Gfx();
|
||||
if (GfxPlugin->SurfaceChanged != NULL)
|
||||
{
|
||||
GfxPlugin->SurfaceChanged(width,height);
|
||||
GfxPlugin->SurfaceChanged(width, height);
|
||||
}
|
||||
}
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Done");
|
||||
|
@ -547,14 +551,14 @@ EXPORT void CALL Java_emu_project64_jni_NativeExports_onSurfaceChanged(JNIEnv *
|
|||
|
||||
EXPORT void CALL Java_emu_project64_jni_NativeExports_UISettingsSaveBool(JNIEnv* env, jclass cls, jint Type, jboolean Value)
|
||||
{
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving UI %d value: %s",Type,Value ? "true" : "false");
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving UI %d value: %s", Type, Value ? "true" : "false");
|
||||
UISettingsSaveBool((UISettingID)Type, Value);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saved");
|
||||
}
|
||||
|
||||
EXPORT void CALL Java_emu_project64_jni_NativeExports_UISettingsSaveDword(JNIEnv* env, jclass cls, jint Type, jint Value)
|
||||
{
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving UI %d value: %X",Type,Value);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving UI %d value: %X", Type, Value);
|
||||
UISettingsSaveDword((UISettingID)Type, Value);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saved");
|
||||
}
|
||||
|
@ -562,7 +566,7 @@ EXPORT void CALL Java_emu_project64_jni_NativeExports_UISettingsSaveDword(JNIEnv
|
|||
EXPORT void CALL Java_emu_project64_jni_NativeExports_UISettingsSaveString(JNIEnv* env, jclass cls, jint Type, jstring Buffer)
|
||||
{
|
||||
const char *value = env->GetStringUTFChars(Buffer, 0);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving UI %d value: %s",Type,value);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saving UI %d value: %s", Type, value);
|
||||
UISettingsSaveString((UISettingID)Type, value);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Saved");
|
||||
env->ReleaseStringUTFChars(Buffer, value);
|
||||
|
|
Loading…
Reference in New Issue