1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 19:47:46 +00:00

Ports: Added a chester port, a very simple GameBoy emulator.

This commit is contained in:
Manuel Palenzuela 2021-03-30 17:26:39 +02:00 committed by Andreas Kling
parent 6d913db9fe
commit 54b4d7611c
5 changed files with 63 additions and 1 deletions

16
Ports/chester/package.sh Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=chester
useconfigure=true
version=git
depends="SDL2"
workdir=chester-public
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMakeToolchain.txt"
files="https://github.com/veikkos/chester/archive/public.tar.gz chester.tar.gz"
configure() {
run cmake $configopts
}
install() {
run cp bin/chester "${SERENITY_BUILD_DIR}/Root/bin"
}

View file

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a68cf88..c541385 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ endif ()
if (MSVC)
add_compile_options(/WX /wd4996)
else()
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
endif()
add_subdirectory(src/lib)

View file

@ -0,0 +1,22 @@
diff --git a/src/app/main.c b/src/app/main.c
index cfd46b8..fc47912 100644
--- a/src/app/main.c
+++ b/src/app/main.c
@@ -47,7 +47,7 @@ bool init_graphics(gpu *g)
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
X_RES * WINDOW_SCALE, Y_RES * WINDOW_SCALE,
- SDL_WINDOW_OPENGL);
+ 0);
if (sdl_graphics_ptr->window == NULL)
{
@@ -58,7 +58,7 @@ bool init_graphics(gpu *g)
sdl_graphics_ptr->renderer = SDL_CreateRenderer(sdl_graphics_ptr->window,
-1,
- SDL_RENDERER_ACCELERATED);
+ 0);
if (sdl_graphics_ptr->renderer == NULL)
{

View file

@ -0,0 +1,10 @@
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
index 95d0a51..be3e4db 100644
--- a/src/app/CMakeLists.txt
+++ b/src/app/CMakeLists.txt
@@ -13,4 +13,4 @@ endif()
find_package(SDL2 REQUIRED)
target_include_directories(chester PRIVATE ${SDL2_INCLUDE_DIR})
-target_link_libraries(chester libchester ${SDL2_LIBRARY})
+target_link_libraries(chester libchester ${SDL2_LIBRARY} -lm -lgfx -lgui -lipc -lcore)