Revert "Build in Maemo/scratchbox"
authorAlberto Mardegan <mardy@users.sourceforge.net>
Fri, 14 Oct 2011 15:42:50 +0000 (18:42 +0300)
committerAlberto Mardegan <mardy@users.sourceforge.net>
Fri, 14 Oct 2011 15:42:50 +0000 (18:42 +0300)
This reverts commit 070824b44f80c9ed7ec1233e4dad3f1bba7c837a.

Conflicts:

Makefile

Makefile
share/config.h
share/glext.h
share/sync.c
share/syswm.c
share/video.c

index fdabded..b31dfcf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,16 +16,12 @@ $(info Will make a "$(BUILD)" build of Neverball $(VERSION).)
 
 #------------------------------------------------------------------------------
 # Provide a target system hint for the Makefile.
-# Recognized PLATFORM values: darwin, mingw, maemo.
+# Recognized PLATFORM values: darwin, mingw.
 
 ifeq ($(shell uname), Darwin)
     PLATFORM := darwin
 endif
 
-ifdef _SBOX_DIR
-    PLATFORM := maemo
-endif
-
 #------------------------------------------------------------------------------
 # Paths (packagers might want to set DATADIR and LOCALEDIR)
 
@@ -90,10 +86,6 @@ ifeq ($(PLATFORM),darwin)
     ALL_CPPFLAGS += -I/opt/local/include
 endif
 
-ifeq ($(PLATFORM),maemo)
-    ALL_CPPFLAGS += -D__MAEMO__ $(shell pkg-config --cflags libosso)
-endif
-
 ALL_CPPFLAGS += $(CPPFLAGS)
 
 #------------------------------------------------------------------------------
@@ -143,10 +135,6 @@ ifeq ($(PLATFORM),darwin)
     OGL_LIBS  := -framework OpenGL
 endif
 
-ifeq ($(PLATFORM),maemo)
-    OGL_LIBS := -lm -lSDL_gles -lEGL -lGLES_CM
-endif
-
 BASE_LIBS := -ljpeg $(PNG_LIBS) $(FS_LIBS)
 
 ifeq ($(PLATFORM),darwin)
index a53a1c2..b975d12 100644 (file)
 #include "base_config.h"
 #include "lang.h"
 
-#ifdef __MAEMO__
-#include <SDL_gles.h>
-#define SDL_GL_SetAttribute(attr, value)  SDL_GLES_SetAttribute(attr, value)
-#define SDL_GL_GetAttribute(attr, value)  SDL_GLES_GetAttribute(attr, value)
-#define SDL_GL_SwapBuffers()              SDL_GLES_SwapBuffers()
-#endif
-
 /*---------------------------------------------------------------------------*/
 
 /* Integer options. */
index 10dd679..63d7419 100644 (file)
@@ -25,8 +25,6 @@
 
 #ifdef __APPLE__
 #include <OpenGL/gl.h>
-#elif defined(__MAEMO__)
-#include <GLES/gl.h>
 #else
 #include <GL/gl.h>
 #endif
index 88c7e90..0395ba9 100644 (file)
@@ -16,7 +16,7 @@
 #include "glext.h"
 
 /*---------------------------------------------------------------------------*/
-#if defined(_WIN32) || defined(__MAEMO__)
+#if defined(_WIN32)
 
 void sync_init(void)
 {
index 7a2c6ef..864deda 100644 (file)
@@ -42,7 +42,7 @@ void set_SDL_icon(const char *filename)
 
 void set_EWMH_icon(const char *filename)
 {
-#if SDL_VIDEO_DRIVER_X11 && !SDL_VIDEO_DRIVER_QUARTZ && !ENABLE_OPENGLES
+#if SDL_VIDEO_DRIVER_X11 && !SDL_VIDEO_DRIVER_QUARTZ
     SDL_SysWMinfo info;
 
     Display *dpy;
index 0beb95c..36693b0 100644 (file)
@@ -20,9 +20,6 @@
 #include "sync.h"
 
 /*---------------------------------------------------------------------------*/
-#ifdef __MAEMO__
-static SDL_GLES_Context *context;
-#endif
 
 int video_init(const char *title, const char *icon)
 {
@@ -38,14 +35,6 @@ int video_init(const char *title, const char *icon)
 
     set_SDL_icon(icon);
 
-#ifdef __MAEMO__
-    if (SDL_GLES_Init(SDL_GLES_VERSION_1_1) != 0)
-    {
-        fprintf(stderr, "SDL_GLES_Init failed\n");
-        return 0;
-    }
-#endif
-
     /* Initialize the video. */
 
     if (!video_mode(config_get_d(CONFIG_FULLSCREEN),
@@ -83,45 +72,20 @@ int video_mode(int f, int w, int h)
 
     /* Require 16-bit double buffer with 16-bit depth buffer. */
 
-#ifndef __MAEMO__ /* SDL_GLES already takes care of these */
     SDL_GL_SetAttribute(SDL_GL_RED_SIZE,     5);
     SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE,   5);
     SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE,    5);
     SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE,  16);
     SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
-#endif
 
     /* Try to set the currently specified mode. */
-    if (SDL_SetVideoMode(w, h, 0,
-#ifdef __MAEMO__
-                         SDL_SWSURFACE |
-#else
-                         SDL_OPENGL |
-#endif
-                         (f ? SDL_FULLSCREEN : 0)))
+
+    if (SDL_SetVideoMode(w, h, 0, SDL_OPENGL | (f ? SDL_FULLSCREEN : 0)))
     {
         config_set_d(CONFIG_FULLSCREEN, f);
         config_set_d(CONFIG_WIDTH,      w);
         config_set_d(CONFIG_HEIGHT,     h);
 
-#ifdef __MAEMO__
-        SDL_ShowCursor(SDL_DISABLE);
-        context = SDL_GLES_CreateContext();
-        if (context == 0)
-        {
-            fprintf(stderr, "SDL_GLES_CreateContext failed\n");
-            fprintf(stderr, "%s\n", SDL_GetError());
-            return 0;
-        }
-
-        if (SDL_GLES_MakeCurrent(context) != 0)
-        {
-            fprintf(stderr, "SDL_GLES_MakeCurrent failed\n");
-            fprintf(stderr, "%s\n", SDL_GetError());
-            return 0;
-        }
-#endif
-
         if (!glext_init())
             return 0;