summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Src/MainAndroid.cpp
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2013-03-27 13:19:23 +1100
committerskidau <skidau@gmail.com>2013-03-27 13:19:23 +1100
commit7784fa4c67cc8d2545f45694d83805e7e89cd583 (patch)
tree7724133aabe971ec417d1dea0977a525bb8debfb /Source/Core/DolphinWX/Src/MainAndroid.cpp
parentd33c19b0cd2bae982c8d35e86a9d3551f9e5c72f (diff)
parent5cea0d9defeaa23e7af94adf7615a44fb2c9c173 (diff)
Merge branch 'master' into wii-network
# By Ryan Houdek (185) and others # Via degasus (12) and others * master: (625 commits) Revert "Don't open/close file for every file operation." as it was crashing PokePark in Windows builds. Array overrun fixed in VertexShaderCache for the DX11 plugin. Fixed DSPTool build. Windows build fix Go back to assuming every HID device is a wiimote on Windows. Fixed issue 6117. Unfixed issue 6031. VideoSoftware: Improve fog range adjustment by using less magic and more comments. revert RasterFont for VideoSoftware ogl: fix virtual xfb Windows build fix from web interface... Adjusted the audio loop criteria, using >= on the Wii and == on GC. This fixes the audio static that occurred in Wii games after hours of play. Forced the exception check only for ARAM DMA transfers. Removed the Eternal Darkness boot hack and replaced it with an exception check. VideoSoftware: Implement fog range adjustment, fixing issue 6147. implement 4xSSAA for OGL move ogl-only settings into backend Fix description of disable fog, and move it to enhancements tab. Reverted rd76ca5783743 as it was made obsolete by r1d550f4496e4. Removed the tracking of the FIFO Writes as it was made obsolete by r1d550f4496e4. Forced the external exception check to occur sooner by changing the downcount. Mark the Direct3D9 backend deprecated. Prefer D3D11 and OpenGL over D3D9 by default. ... Conflicts: CMakeLists.txt Source/Core/Common/Common.vcxproj.filters Source/Core/Common/Src/CommonPaths.h Source/Core/Core/Core.vcxproj.filters Source/Core/Core/Src/Core.cpp Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp Source/VSProps/Dolphin.Win32.props Source/VSProps/Dolphin.x64.props
Diffstat (limited to 'Source/Core/DolphinWX/Src/MainAndroid.cpp')
-rw-r--r--Source/Core/DolphinWX/Src/MainAndroid.cpp149
1 files changed, 149 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Src/MainAndroid.cpp b/Source/Core/DolphinWX/Src/MainAndroid.cpp
new file mode 100644
index 0000000000..ca2119921d
--- /dev/null
+++ b/Source/Core/DolphinWX/Src/MainAndroid.cpp
@@ -0,0 +1,149 @@
+// Copyright (C) 2003 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include "Common.h"
+#include "FileUtil.h"
+
+#include "Core.h"
+#include "Host.h"
+#include "CPUDetect.h"
+#include "Thread.h"
+
+#include "PowerPC/PowerPC.h"
+#include "HW/Wiimote.h"
+
+#include "VideoBackendBase.h"
+#include "ConfigManager.h"
+#include "LogManager.h"
+#include "BootManager.h"
+
+#include <jni.h>
+#include <android/log.h>
+#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "Dolphinemu", __VA_ARGS__))
+
+bool rendererHasFocus = true;
+bool running = true;
+
+void Host_NotifyMapLoaded() {}
+void Host_RefreshDSPDebuggerWindow() {}
+
+void Host_ShowJitResults(unsigned int address){}
+
+Common::Event updateMainFrameEvent;
+void Host_Message(int Id)
+{
+}
+
+void* Host_GetRenderHandle()
+{
+ return NULL;
+}
+
+void* Host_GetInstance() { return NULL; }
+
+void Host_UpdateTitle(const char* title){};
+
+void Host_UpdateLogDisplay(){}
+
+void Host_UpdateDisasmDialog(){}
+
+void Host_UpdateMainFrame()
+{
+}
+
+void Host_UpdateBreakPointView(){}
+
+bool Host_GetKeyState(int keycode)
+{
+ return false;
+}
+
+void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height)
+{
+ x = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos;
+ y = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos;
+ width = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth;
+ height = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight;
+}
+
+void Host_RequestRenderWindowSize(int width, int height) {}
+void Host_SetStartupDebuggingParameters()
+{
+}
+
+bool Host_RendererHasFocus()
+{
+ return true;
+}
+
+void Host_ConnectWiimote(int wm_idx, bool connect) {}
+
+void Host_SetWaitCursor(bool enable){}
+
+void Host_UpdateStatusBar(const char* _pText, int Filed){}
+
+void Host_SysMessage(const char *fmt, ...)
+{
+ va_list list;
+ char msg[512];
+
+ va_start(list, fmt);
+ vsprintf(msg, fmt, list);
+ va_end(list);
+
+ size_t len = strlen(msg);
+ if (msg[len - 1] != '\n') {
+ msg[len - 1] = '\n';
+ msg[len] = '\0';
+ }
+ LOGI(msg);
+}
+
+void Host_SetWiiMoteConnectionState(int _State) {}
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_dolphinemuactivity_main(JNIEnv *env, jobject obj)
+{
+ LogManager::Init();
+ SConfig::Init();
+ VideoBackend::PopulateList();
+ VideoBackend::ActivateBackend(SConfig::GetInstance().
+ m_LocalCoreStartupParameter.m_strVideoBackend);
+ WiimoteReal::LoadSettings();
+
+ // No use running the loop when booting fails
+ if (BootManager::BootCore(""))
+ {
+ while (PowerPC::GetState() != PowerPC::CPU_POWERDOWN)
+ updateMainFrameEvent.Wait();
+ }
+
+ WiimoteReal::Shutdown();
+ VideoBackend::ClearList();
+ SConfig::Shutdown();
+ LogManager::Shutdown();
+}
+
+#ifdef __cplusplus
+}
+#endif