Merge pull request #673 from reicast/loungekatt

Fixes for building iOS / Android in parallel
This commit is contained in:
TwistedUmbrella 2015-07-05 11:15:08 -04:00
commit e229b44821
9 changed files with 40 additions and 15 deletions

View File

@ -66,6 +66,7 @@ void mcfg_Create(MapleDeviceType type,u32 bus,u32 port)
MapleDevices[bus][port]=dev;
}
#ifndef _ANDROID
void mcfg_CreateDevices()
{
mcfg_Create(MDT_SegaController,0,5);
@ -75,6 +76,15 @@ void mcfg_CreateDevices()
mcfg_Create(MDT_SegaVMU,0,1);
#endif
}
#else
void mcfg_CreateDevices()
{
mcfg_Create(MDT_SegaController,0,5);
mcfg_Create(MDT_SegaVMU,0,0);
mcfg_Create(MDT_SegaVMU,0,1);
}
#endif
void mcfg_DestroyDevices()
{

View File

@ -62,5 +62,9 @@ struct IMapleConfigMap
virtual ~IMapleConfigMap() {}
};
#ifndef _ANDROID
void mcfg_CreateDevices();
#else
void mcfg_CreateDevices();
#endif
void mcfg_DestroyDevices();

View File

@ -234,7 +234,11 @@ double os_GetSeconds()
return a.tv_sec-tvs_base+a.tv_usec/1000000.0;
}
#if HOST_OS != OS_LINUX
#if HOST_OS == OS_DARWIN
void os_DebugBreak() {
__asm__("trap");
}
#elif HOST_OS != OS_LINUX
void os_DebugBreak()
{
__builtin_trap();

View File

@ -206,7 +206,11 @@ int dc_init(int argc,wchar* argv[])
mem_map_default();
#ifndef _ANDROID
mcfg_CreateDevices();
#else
mcfg_CreateDevices();
#endif
plugins_Reset(false);
mem_Reset(false);

View File

@ -507,13 +507,8 @@ using namespace std;
#define VER_FULLNAME VER_EMUNAME " rel0" _X_x_X_MMU_VER_STR " (built " __DATE__ "@" __TIME__ ")"
#define VER_SHORTNAME VER_EMUNAME " rel0" _X_x_X_MMU_VER_STR
#if HOST_OS == OS_DARWIN
void os_DebugBreak() {
raise(SIGTRAP);
}
#else
void os_DebugBreak();
#endif
void os_DebugBreak();
#define dbgbreak os_DebugBreak()
#if COMPILER_VC==BUILD_COMPILER

View File

@ -103,7 +103,7 @@
<activity
android:name=".GL2JNIActivity"
android:configChanges="orientation|screenSize|screenLayout|uiMode|keyboard|keyboardHidden"
android:screenOrientation="landscape"
android:screenOrientation="sensorLandscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<meta-data
android:name="android.app.lib_name"
@ -112,7 +112,7 @@
<activity
android:name=".GL2JNINative"
android:configChanges="orientation|screenSize|screenLayout|uiMode|keyboard|keyboardHidden"
android:screenOrientation="landscape"
android:screenOrientation="sensorLandscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<meta-data
android:name="android.app.lib_name"
@ -137,7 +137,7 @@
<activity
android:name=".config.EditVJoyActivity"
android:configChanges="orientation|screenSize|screenLayout|uiMode|keyboard|keyboardHidden"
android:screenOrientation="landscape"
android:screenOrientation="sensorLandscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
</application>

View File

@ -132,6 +132,7 @@ public class MainActivity extends SlidingFragmentActivity implements
// Flush the intent to prevent multiple calls
getIntent().setData(null);
setIntent(null);
Config.externalIntent = true;
}
}

View File

@ -65,6 +65,8 @@ public class Config {
public static String git_issues = "https://github.com/reicast/reicast-emulator/issues/";
public static String log_url = "http://loungekatt.no-ip.biz:3194/ReicastBot/report/submit.php";
public static String report_url = "http://loungekatt.no-ip.biz:3194/ReicastBot/report/logs/";
public static boolean externalIntent = false;
private SharedPreferences mPrefs;

View File

@ -94,6 +94,7 @@ public class OnScreenMenu {
fpsText.setGravity(Gravity.CENTER);
fpsText.setText("XX");
setContentView(fpsText);
setFocusable(false);
}
public void setText(int frames) {
@ -452,7 +453,7 @@ public class OnScreenMenu {
vlay = new LinearLayout(mContext);
vlay.setOrientation(LinearLayout.HORIZONTAL);
setContentView(vlay);
setFocusable(true);
setFocusable(false);
}
public void showVmu() {
@ -550,9 +551,13 @@ public class OnScreenMenu {
OnClickListener clickExit = new OnClickListener() {
public void onClick(View v) {
Intent inte = new Intent(mContext, MainActivity.class);
mContext.startActivity(inte);
((Activity) mContext).finish();
if (Config.externalIntent) {
((Activity) mContext).finish();
} else {
Intent inte = new Intent(mContext, MainActivity.class);
mContext.startActivity(inte);
((Activity) mContext).finish();
}
}
};
Button buttonExit = (Button) hlay.findViewById(R.id.buttonExit);