skyline/app/src/main/cpp/lightswitch.cpp

20 lines
500 B
C++
Raw Normal View History

#include <jni.h>
#include <string>
2019-06-29 17:21:59 +03:00
#include <syslog.h>
2019-07-03 00:43:49 +03:00
#include <core/arm/cpu.h>
#include <core/hos/loaders/nro.h>
#include <core/arm/memory.h>
2019-06-29 17:21:59 +03:00
extern "C" JNIEXPORT jstring JNICALL
Java_gq_cyuubi_lightswitch_MainActivity_stringFromJNI(
JNIEnv *env,
jobject /* this */) {
2019-06-29 17:21:59 +03:00
2019-07-03 00:43:49 +03:00
core::cpu::Initialize();
2019-07-03 00:55:31 +03:00
core::loader::LoadNro("/sdcard/lawsofaviation.nro");
2019-07-03 00:43:49 +03:00
core::cpu::Run(BASE_ADDRESS);
2019-06-29 17:21:59 +03:00
std::string finished = "finished!";
return env->NewStringUTF(finished.c_str());
}