[Android-overlay] Support touch screen axises in native. Have a non-configurable main joystick on screen at this point.

This commit is contained in:
Ryan Houdek
2013-11-14 15:17:51 -06:00
parent 9d3d568ae4
commit feedee5c23
7 changed files with 305 additions and 69 deletions

View File

@ -241,6 +241,10 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onTouchEvent
{
ButtonManager::TouchEvent(Button, Action);
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onTouchAxisEvent(JNIEnv *env, jobject obj, jint Button, jfloat Action)
{
ButtonManager::TouchAxisEvent(Button, Action);
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadEvent(JNIEnv *env, jobject obj, jstring jDevice, jint Button, jint Action)
{
const char *Device = env->GetStringUTFChars(jDevice, NULL);
@ -375,15 +379,6 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv *
VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend);
WiimoteReal::LoadSettings();
// Load our Android specific settings
IniFile ini;
bool onscreencontrols = true;
ini.Load(File::GetUserPath(D_CONFIG_IDX) + std::string("Dolphin.ini"));
ini.Get("Android", "ScreenControls", &onscreencontrols, true);
if (onscreencontrols)
OSD::AddCallback(OSD::OSD_ONFRAME, ButtonManager::DrawButtons);
// No use running the loop when booting fails
if ( BootManager::BootCore( g_filename.c_str() ) )
while (PowerPC::GetState() != PowerPC::CPU_POWERDOWN)