Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit 201bf15

Browse files
authored
Merge pull request #1662 from reicast/skmp/rpi4
Updated makefile/x11 for rpi4
2 parents 0cdd7d8 + b6be830 commit 201bf15

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

core/linux-dist/x11.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,10 @@ void x11_window_set_text(const char* text)
572572

573573
void x11_gl_context_destroy()
574574
{
575-
glXMakeCurrent((Display*)x11_disp, None, NULL);
576-
glXDestroyContext((Display*)x11_disp, (GLXContext)x11_glc);
575+
#if !defined(GLES)
576+
glXMakeCurrent((Display*)x11_disp, None, NULL);
577+
glXDestroyContext((Display*)x11_disp, (GLXContext)x11_glc);
578+
#endif
577579
}
578580

579581
void x11_window_destroy()

shell/linux/Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ ifeq (,$(platform))
6161
HARDWARE = $(shell grep Hardware /proc/cpuinfo)
6262
ifneq (,$(findstring BCM2709,$(HARDWARE)))
6363
platform = rpi2
64+
else ifneq (,$(findstring BCM2835,$(HARDWARE)))
65+
platform = rpi4
6466
else ifneq (,$(findstring AM33XX,$(HARDWARE)))
6567
platform = beagle
6668
else ifneq (,$(findstring Pandora,$(HARDWARE)))
@@ -179,7 +181,19 @@ else ifneq (,$(findstring lincpp,$(platform)))
179181
CFLAGS += -D TARGET_LINUX_x64 -D TARGET_NO_JIT
180182
CXXFLAGS += -fexceptions -std=gnu++11
181183

182-
# Raspberry Pi 2
184+
# Raspberry Pi 4
185+
else ifneq (,$(findstring rpi4,$(platform)))
186+
187+
CFLAGS += -D TARGET_BEAGLE -D TARGET_LINUX_ARMELv7 -DARM_HARDFP -fsingle-precision-constant
188+
CFLAGS += -DGLES3
189+
190+
USE_X11 := 1
191+
USE_GLES := 1
192+
193+
MFLAGS += -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard
194+
ASFLAGS += -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard
195+
196+
# Raspberry Pi 2/3
183197
else ifneq (,$(findstring rpi,$(platform)))
184198
CFLAGS += -D TARGET_BEAGLE -D TARGET_LINUX_ARMELv7 -DARM_HARDFP -fsingle-precision-constant
185199
ifneq (,$(findstring rpi2,$(platform)))

0 commit comments

Comments
 (0)