#include <errno.h>
#include <SDL.h>
+
+#ifndef GP2X
#include <SDL_stdinc.h>
+#endif
#include "tinygettext.hpp"
#include "log.hpp"
const std::string& from_charset,
const std::string& to_charset)
{
+#ifndef GP2X
if (from_charset == to_charset)
return text;
std::string ret(out);
SDL_free(out);
return ret;
+#else
+ log_warning << "FIXME: Char conversion not supported on GP2X!" << std::endl;
+ return "";
+#endif
#if 0
iconv_t cd = SDL_iconv_open(to_charset.c_str(), from_charset.c_str());
if(texture_manager != 0)
texture_manager->save_textures();
+#ifndef GP2X
+ //FIXME: This is not supported on the GP2X
if(config->try_vsync) {
/* we want vsync for smooth scrolling */
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
}
+#endif
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
int n = 8;
+ //FIXME: This doesn't work with OpenGL ES
glBegin(GL_QUAD_STRIP);
for(int i = 0; i <= n; ++i)
{
#include <sstream>
#include <stdexcept>
-#ifndef MACOSX
-#include <GL/gl.h>
-#include <GL/glext.h>
-#else
+#ifdef MACOSX
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
+#else
+#ifdef GP2X
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+#else
+#include <GL/gl.h>
+#include <GL/glext.h>
+#endif
#endif
static inline void check_gl_error(const char* message)
SavedTexture saved_texture;
saved_texture.texture = texture;
glBindTexture(GL_TEXTURE_2D, texture->get_handle());
+
+ //this doesn't work with OpenGL ES (but we don't need it on the GP2X anyway)
+#ifndef GP2X
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH,
&saved_texture.width);
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT,
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE,
saved_texture.pixels);
+#endif
saved_textures.push_back(saved_texture);