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

20 lines
500 B
C++
Raw Normal View History

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