This commit is contained in:
dgis 2018-12-10 20:54:43 +00:00
parent a4300ac91a
commit ae82c3d4b5
57 changed files with 52 additions and 46 deletions

View file

@ -17,41 +17,40 @@ add_library( # Sets the name of the library.
SHARED SHARED
# Provides a relative path to your source file(s). # Provides a relative path to your source file(s).
#src/main/cpp/native-lib.cpp
src/main/cpp/apple.c src/main/cpp/core/apple.c
# src/main/cpp/cursor.c # src/main/cpp/core/cursor.c
# src/main/cpp/ddeserv.c # src/main/cpp/core/ddeserv.c
# src/main/cpp/debugger.c # src/main/cpp/core/debugger.c
src/main/cpp/disasm.c src/main/cpp/core/disasm.c
src/main/cpp/dismem.c src/main/cpp/core/dismem.c
src/main/cpp/display.c src/main/cpp/core/display.c
src/main/cpp/disrpl.c src/main/cpp/core/disrpl.c
# src/main/cpp/Emu48.c #-> To rewrite # src/main/cpp/core/Emu48.c #-> To rewrite
src/main/cpp/engine.c src/main/cpp/core/engine.c
src/main/cpp/external.c src/main/cpp/core/external.c
src/main/cpp/fetch.c src/main/cpp/core/fetch.c
src/main/cpp/files.c src/main/cpp/core/files.c
src/main/cpp/i28f160.c src/main/cpp/core/i28f160.c
src/main/cpp/keyboard.c src/main/cpp/core/keyboard.c
src/main/cpp/keymacro.c src/main/cpp/core/keymacro.c
src/main/cpp/kml.c src/main/cpp/core/kml.c
src/main/cpp/lodepng.c src/main/cpp/core/lodepng.c
src/main/cpp/lowbat.c src/main/cpp/core/lowbat.c
src/main/cpp/mops.c src/main/cpp/core/mops.c
src/main/cpp/mru.c src/main/cpp/core/mru.c
src/main/cpp/opcodes.c src/main/cpp/core/opcodes.c
src/main/cpp/pch.c src/main/cpp/core/pch.c
# src/main/cpp/redeye.c # src/main/cpp/core/redeye.c
src/main/cpp/rpl.c src/main/cpp/core/rpl.c
# src/main/cpp/serial.c # src/main/cpp/core/serial.c
src/main/cpp/settings.c src/main/cpp/core/settings.c
# src/main/cpp/sndenum.c # src/main/cpp/core/sndenum.c
# src/main/cpp/sound.c # -> To rewrite # src/main/cpp/core/sound.c # -> To rewrite
src/main/cpp/stack.c src/main/cpp/core/stack.c
src/main/cpp/symbfile.c src/main/cpp/core/symbfile.c
src/main/cpp/timer.c src/main/cpp/core/timer.c
# src/main/cpp/udp.c # src/main/cpp/core/udp.c
src/main/cpp/win32-layer.c src/main/cpp/win32-layer.c
src/main/cpp/android-layer.c src/main/cpp/android-layer.c

View file

@ -6,12 +6,12 @@
* Copyright (C) 1995 Sebastien Carlier * Copyright (C) 1995 Sebastien Carlier
* *
*/ */
#include "pch.h" #include "core/pch.h"
#include "resource.h" #include "core/resource.h"
#include "Emu48.h" #include "core/Emu48.h"
#include "io.h" #include "core/io.h"
#include "kml.h" #include "core/kml.h"
#include "debugger.h" #include "core/debugger.h"
#include "win32-layer.h" #include "win32-layer.h"
#define VERSION "1.59+" #define VERSION "1.59+"

View file

@ -1,5 +1,5 @@
#include "pch.h" #include "core/pch.h"
#include "Emu48.h" #include "core/Emu48.h"
// Redeye.c // Redeye.c
VOID IrPrinter(BYTE c) { VOID IrPrinter(BYTE c) {

View file

@ -24,7 +24,7 @@
//#include <conio.h> //#include <conio.h>
//#include <crtdbg.h> //#include <crtdbg.h>
#include "win32-layer.h" #include "../win32-layer.h"
#include <android/log.h> #include <android/log.h>
#define LOG_TAG "NDK_NativeEmu48" #define LOG_TAG "NDK_NativeEmu48"
#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) #define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))

View file

@ -7,7 +7,7 @@
#include <android/asset_manager_jni.h> #include <android/asset_manager_jni.h>
#include <android/bitmap.h> #include <android/bitmap.h>
#include "pch.h" #include "core/pch.h"
extern void emu48Start(); extern void emu48Start();
extern AAssetManager * assetManager; extern AAssetManager * assetManager;

View file

@ -1,11 +1,11 @@
#include "pch.h" #include "core/pch.h"
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <pthread.h> #include <pthread.h>
#include <android/bitmap.h> #include <android/bitmap.h>
#include "resource.h" #include "core/resource.h"
#include "win32-layer.h" #include "win32-layer.h"
extern JavaVM *java_machine; extern JavaVM *java_machine;

View file

@ -3,6 +3,7 @@ package com.regis.cosnier.emu48;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.content.res.AssetManager; import android.content.res.AssetManager;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Canvas; import android.graphics.Canvas;
@ -242,6 +243,7 @@ public class MainScreenView extends SurfaceView {
final int CALLBACK_TYPE_GETOPENFILENAME = 2; final int CALLBACK_TYPE_GETOPENFILENAME = 2;
final int CALLBACK_TYPE_GETSAVEFILENAME = 3; final int CALLBACK_TYPE_GETSAVEFILENAME = 3;
final int INTENT_GETSAVEFILENAME = 1;
int updateCallback(int type, int param1, int param2, String param3, String param4) { int updateCallback(int type, int param1, int param2, String param3, String param4) {
switch (type) { switch (type) {
case CALLBACK_TYPE_INVALIDATE: case CALLBACK_TYPE_INVALIDATE:
@ -255,6 +257,11 @@ public class MainScreenView extends SurfaceView {
case CALLBACK_TYPE_GETOPENFILENAME: case CALLBACK_TYPE_GETOPENFILENAME:
break; break;
case CALLBACK_TYPE_GETSAVEFILENAME: case CALLBACK_TYPE_GETSAVEFILENAME:
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("YOUR FILETYPE"); //not needed, but maybe usefull
intent.putExtra(Intent.EXTRA_TITLE, "YOUR FILENAME"); //not needed, but maybe usefull
((Activity)getContext()).startActivityForResult(intent, INTENT_GETSAVEFILENAME);
break; break;
} }
return -1; return -1;