0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-16 03:05:06 +00:00

android: fix all the merging/rebasing mess

This commit is contained in:
Sigrid Solveig Haflínudóttir 2021-12-29 22:32:27 +01:00
parent 69baac4646
commit 67a9b1a4b0
4 changed files with 11 additions and 10 deletions

View file

@ -9,11 +9,12 @@ LOCAL_C_INCLUDES := $(SDL_PATH)/include $(UXN_DIR)/src
LOCAL_SRC_FILES := \
$(UXN_DIR)/src/uxn-fast.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/mouse.c \
$(UXN_DIR)/src/devices/ppu.c \
$(UXN_DIR)/src/devices/ppu_aarch64.c
$(UXN_DIR)/src/devices/screen.c \
$(UXN_DIR)/src/devices/screen_aarch64.c
LOCAL_SHARED_LIBRARIES := SDL2
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog

View file

@ -114,7 +114,7 @@ screen_clear(UxnScreen *p, Layer *layer)
layer->changed = 1;
}
#pragma weak ppu_redraw
#pragma weak screen_redraw
void
screen_redraw(UxnScreen *p, Uint32 *pixels)
{

View file

@ -1,9 +1,10 @@
#ifdef __aarch64__
#include <arm_neon.h>
#include "ppu.h"
#include "../uxn.h"
#include "screen.h"
void
ppu_redraw(Ppu *p, Uint32 *screen)
screen_redraw(UxnScreen *p, Uint32 *screen)
{
uint8x16x4_t pal = vld4q_u8((Uint8*)p->palette);
Uint8 *fg = p->fg.pixels;

View file

@ -110,7 +110,7 @@ set_window_size(SDL_Window *window, int w, int h)
SDL_SetWindowSize(window, w, h);
}
static int
int
set_size(Uint16 width, Uint16 height, int is_resize)
{
screen_resize(&uxn_screen, width, height);
@ -338,7 +338,6 @@ start(Uxn *u, char *rom)
static void
set_zoom(Uint8 scale)
{
{
#ifdef __ANDROID__
(void)scale;
#else
@ -456,7 +455,7 @@ mouse_steal(SDL_Event *event)
#ifdef __ANDROID__
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(SDL_IsTextInputActive())
SDL_StopTextInput();
@ -490,7 +489,7 @@ run(Uxn *u)
#ifdef __ANDROID__
/* rotation does something weird, have to redraw twice */
if(event.window.event == SDL_WINDOWEVENT_RESIZED)
redraw();
redraw(u);
#endif
force_redraw = 1;
}