summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-09-09 20:28:48 +0000
committerrubidium <rubidium@openttd.org>2011-09-09 20:28:48 +0000
commit39eaf0e10d89188470878e9c89430d5352b1c009 (patch)
tree54570a2004908ede25d346fe21d96d542f90fb3f
parentd78a4850a6c480a486fec7341dac3212166ec65c (diff)
downloadopenttd-39eaf0e10d89188470878e9c89430d5352b1c009.tar.xz
(svn r22913) -Fix [OSX]: make splash work again and make it work without needing to bundle it first
-rw-r--r--Makefile.src.in3
-rw-r--r--src/os/macosx/splash.cpp2
-rw-r--r--src/os/macosx/splash.h12
3 files changed, 6 insertions, 11 deletions
diff --git a/Makefile.src.in b/Makefile.src.in
index 2b268731d..eb9398839 100644
--- a/Makefile.src.in
+++ b/Makefile.src.in
@@ -253,6 +253,9 @@ $(BIN_DIR)/$(TTD): $(TTD)
ifeq ($(OS), UNIX)
$(Q)cp $(MEDIA_DIR)/openttd.32.bmp $(BIN_DIR)/data/
endif
+ifeq ($(OS), OSX)
+ $(Q)cp $(ROOT_DIR)/os/macosx/splash.png $(BIN_DIR)/data/
+endif
$(TTD): $(OBJS) $(CONFIG_CACHE_LINKER)
$(E) '$(STAGE) Linking $@'
diff --git a/src/os/macosx/splash.cpp b/src/os/macosx/splash.cpp
index 4c283495b..a711bfd80 100644
--- a/src/os/macosx/splash.cpp
+++ b/src/os/macosx/splash.cpp
@@ -51,7 +51,7 @@ static void PNGAPI png_my_warning(png_structp png_ptr, png_const_charp message)
*/
void DisplaySplashImage()
{
- FILE *f = FioFOpenFile(SPLASH_IMAGE_FILE, "r", BASE_DIR);
+ FILE *f = FioFOpenFile(SPLASH_IMAGE_FILE, "r", BASESET_DIR);
if (f == NULL) return;
png_byte header[8];
diff --git a/src/os/macosx/splash.h b/src/os/macosx/splash.h
index e5399a2cf..90e663814 100644
--- a/src/os/macosx/splash.h
+++ b/src/os/macosx/splash.h
@@ -12,16 +12,8 @@
#ifndef SPLASH_H
#define SPLASH_H
-#define SPLASH_IMAGE_FILE "splash.png"
+#define SPLASH_IMAGE_FILE "splash.png"
-#ifdef __cplusplus
-extern "C" {
-#endif //__cplusplus
-
- void DisplaySplashImage();
-
-#ifdef __cplusplus
-}
-#endif //__cplusplus
+void DisplaySplashImage();
#endif /* SPLASH_H */