mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
- Fix black-screen when starting up from Deskbar link. - Simplified directory structure a bit. - Enable build on 64 bits.
107 lines
2.8 KiB
Plaintext
107 lines
2.8 KiB
Plaintext
From f2cee8ff79449399429911743ce006d036bcc12d Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Sat, 22 Dec 2018 13:43:58 +0100
|
|
Subject: add the proper place to look for the SDL headers/libs
|
|
|
|
|
|
diff --git a/archs/BeOS/variables.GNU b/archs/BeOS/variables.GNU
|
|
index 2e1b65a..d02d976 100644
|
|
--- a/archs/BeOS/variables.GNU
|
|
+++ b/archs/BeOS/variables.GNU
|
|
@@ -5,10 +5,10 @@ STRIP := strip
|
|
MKDIR_CMD = test -d $(@D) || mkdir -p $(@D)
|
|
############################################################
|
|
|
|
-CPPFLAGS += -I/boot/develop/tools/gnupro/include/SDL
|
|
+CPPFLAGS=-I"$(shell finddir B_SYSTEM_HEADERS_DIRECTORY)/SDL"
|
|
|
|
LDFLAGS += \
|
|
- -L$(HOME)/config/lib -lSDL -lSDL_image -lSDLmain
|
|
+ -L$(shell finddir B_SYSTEM_LIB_DIRECTORY) -lSDL -lSDL_image -lSDLmain
|
|
|
|
prog: Release/54321-$(ARCH)
|
|
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 300b9eefa2982dfd4701199cb014f151d569b160 Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Sat, 22 Dec 2018 13:47:06 +0100
|
|
Subject: use main() instead of SDL_main()
|
|
|
|
|
|
diff --git a/code/main.cpp b/code/main.cpp
|
|
index 9c28c76..f174994 100644
|
|
--- a/code/main.cpp
|
|
+++ b/code/main.cpp
|
|
@@ -29,7 +29,7 @@
|
|
#include "life.h"
|
|
#include "lifeController.h"
|
|
extern "C" int
|
|
- SDL_main( int argc, char** argv )
|
|
+ main( int argc, char** argv )
|
|
{
|
|
unsigned int initFlags = 0;
|
|
initFlags |= SDL_INIT_VIDEO;
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 84a76fec21f0bfe6c85ff86e08e8c646a4890043 Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Sat, 22 Dec 2018 13:53:35 +0100
|
|
Subject: disable fullscreen on startup
|
|
|
|
|
|
diff --git a/code/main.cpp b/code/main.cpp
|
|
index f174994..15853be 100644
|
|
--- a/code/main.cpp
|
|
+++ b/code/main.cpp
|
|
@@ -42,7 +42,7 @@
|
|
|
|
videoFlags |= SDL_SWSURFACE;
|
|
if ( argc <= 1 ) {
|
|
- videoFlags |= SDL_FULLSCREEN;
|
|
+ videoFlags |= SDL_HWPALETTE;
|
|
}
|
|
|
|
SDL_Surface* screen = ::SDL_SetVideoMode(
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 33daf7e7178d642f3005a8e52222fc1392226aaf Mon Sep 17 00:00:00 2001
|
|
From: Oscar Lesta <oscar.lesta@gmail.com>
|
|
Date: Tue, 16 May 2023 06:14:06 -0300
|
|
Subject: Fix startup directory.
|
|
|
|
Fixes starting it up from Tracker/Deskbar.
|
|
|
|
diff --git a/code/main.cpp b/code/main.cpp
|
|
index 15853be..0b957a6 100644
|
|
--- a/code/main.cpp
|
|
+++ b/code/main.cpp
|
|
@@ -28,9 +28,18 @@
|
|
#include "lifeView.h"
|
|
#include "life.h"
|
|
#include "lifeController.h"
|
|
+ #ifdef __HAIKU__
|
|
+ #include <unistd.h>
|
|
+ #include <libgen.h>
|
|
+ #endif
|
|
extern "C" int
|
|
main( int argc, char** argv )
|
|
{
|
|
+ #ifdef __HAIKU__
|
|
+ char path[PATH_MAX];
|
|
+ realpath(argv[0], path);
|
|
+ chdir(dirname(path));
|
|
+ #endif
|
|
unsigned int initFlags = 0;
|
|
initFlags |= SDL_INIT_VIDEO;
|
|
initFlags |= SDL_INIT_AUDIO;
|
|
--
|
|
2.37.3
|
|
|