mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-16 11:15:06 +00:00
android: fix all the merging/rebasing mess
This commit is contained in:
parent
69baac4646
commit
67a9b1a4b0
4 changed files with 11 additions and 10 deletions
|
@ -9,11 +9,12 @@ LOCAL_C_INCLUDES := $(SDL_PATH)/include $(UXN_DIR)/src
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
$(UXN_DIR)/src/uxn-fast.c \
|
$(UXN_DIR)/src/uxn-fast.c \
|
||||||
$(UXN_DIR)/src/uxnemu.c \
|
$(UXN_DIR)/src/uxnemu.c \
|
||||||
$(UXN_DIR)/src/devices/apu.c \
|
$(UXN_DIR)/src/devices/audio.c \
|
||||||
|
$(UXN_DIR)/src/devices/controller.c \
|
||||||
$(UXN_DIR)/src/devices/file.c \
|
$(UXN_DIR)/src/devices/file.c \
|
||||||
$(UXN_DIR)/src/devices/mouse.c \
|
$(UXN_DIR)/src/devices/mouse.c \
|
||||||
$(UXN_DIR)/src/devices/ppu.c \
|
$(UXN_DIR)/src/devices/screen.c \
|
||||||
$(UXN_DIR)/src/devices/ppu_aarch64.c
|
$(UXN_DIR)/src/devices/screen_aarch64.c
|
||||||
LOCAL_SHARED_LIBRARIES := SDL2
|
LOCAL_SHARED_LIBRARIES := SDL2
|
||||||
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog
|
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ screen_clear(UxnScreen *p, Layer *layer)
|
||||||
layer->changed = 1;
|
layer->changed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma weak ppu_redraw
|
#pragma weak screen_redraw
|
||||||
void
|
void
|
||||||
screen_redraw(UxnScreen *p, Uint32 *pixels)
|
screen_redraw(UxnScreen *p, Uint32 *pixels)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#ifdef __aarch64__
|
#ifdef __aarch64__
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#include "ppu.h"
|
#include "../uxn.h"
|
||||||
|
#include "screen.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
ppu_redraw(Ppu *p, Uint32 *screen)
|
screen_redraw(UxnScreen *p, Uint32 *screen)
|
||||||
{
|
{
|
||||||
uint8x16x4_t pal = vld4q_u8((Uint8*)p->palette);
|
uint8x16x4_t pal = vld4q_u8((Uint8*)p->palette);
|
||||||
Uint8 *fg = p->fg.pixels;
|
Uint8 *fg = p->fg.pixels;
|
|
@ -110,7 +110,7 @@ set_window_size(SDL_Window *window, int w, int h)
|
||||||
SDL_SetWindowSize(window, w, h);
|
SDL_SetWindowSize(window, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int
|
||||||
set_size(Uint16 width, Uint16 height, int is_resize)
|
set_size(Uint16 width, Uint16 height, int is_resize)
|
||||||
{
|
{
|
||||||
screen_resize(&uxn_screen, width, height);
|
screen_resize(&uxn_screen, width, height);
|
||||||
|
@ -338,7 +338,6 @@ start(Uxn *u, char *rom)
|
||||||
static void
|
static void
|
||||||
set_zoom(Uint8 scale)
|
set_zoom(Uint8 scale)
|
||||||
{
|
{
|
||||||
{
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
(void)scale;
|
(void)scale;
|
||||||
#else
|
#else
|
||||||
|
@ -456,7 +455,7 @@ mouse_steal(SDL_Event *event)
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
int x = event->motion.x - PAD, y = event->motion.y - PAD;
|
int x = event->motion.x - PAD, y = event->motion.y - PAD;
|
||||||
|
|
||||||
if(x < 0 || x > ppu.width || y < 0 || y > ppu.height) {
|
if(x < 0 || x > uxn_screen.width || y < 0 || y > uxn_screen.height) {
|
||||||
if(event->type == SDL_MOUSEBUTTONDOWN) {
|
if(event->type == SDL_MOUSEBUTTONDOWN) {
|
||||||
if(SDL_IsTextInputActive())
|
if(SDL_IsTextInputActive())
|
||||||
SDL_StopTextInput();
|
SDL_StopTextInput();
|
||||||
|
@ -490,7 +489,7 @@ run(Uxn *u)
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
/* rotation does something weird, have to redraw twice */
|
/* rotation does something weird, have to redraw twice */
|
||||||
if(event.window.event == SDL_WINDOWEVENT_RESIZED)
|
if(event.window.event == SDL_WINDOWEVENT_RESIZED)
|
||||||
redraw();
|
redraw(u);
|
||||||
#endif
|
#endif
|
||||||
force_redraw = 1;
|
force_redraw = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue