ANDROID: cleanup

This commit is contained in:
dhewg 2011-03-01 22:16:10 +01:00
parent 2333a32697
commit bd7e3e9bb2
4 changed files with 10 additions and 16 deletions

View File

@ -442,9 +442,12 @@ bool OSystem_Android::pollEvent(Common::Event &event) {
} else {
// Touchscreen events need to be converted
// from device to game coords first.
const GLESTexture *tex = _show_overlay
? static_cast<GLESTexture *>(_overlay_texture)
: static_cast<GLESTexture *>(_game_texture);
const GLESTexture *tex;
if (_show_overlay)
tex = _overlay_texture;
else
tex = _game_texture;
event.mouse.x = scalef(event.mouse.x, tex->width(),
_egl_surface_width);
event.mouse.y = scalef(event.mouse.y, tex->height(),

View File

@ -128,8 +128,8 @@ void OSystem_Android::initSize(uint width, uint height,
_game_texture->allocBuffer(width, height);
GLuint overlay_width = _egl_surface_width;
GLuint overlay_height = _egl_surface_height;
int overlay_width = _egl_surface_width;
int overlay_height = _egl_surface_height;
// the 'normal' theme layout uses a max height of 400 pixels. if the
// surface is too big we use only a quarter of the size so that the widgets
@ -290,13 +290,8 @@ void OSystem_Android::updateScreen() {
int res = JNI::swapBuffers();
if (res) {
if (res)
warning("swapBuffers returned 0x%x", res);
#if 0
JNI::initSurface();
setupSurface();
#endif
}
}
Graphics::Surface *OSystem_Android::lockScreen() {

View File

@ -154,7 +154,7 @@ void GLESTexture::updateBuffer(GLuint x, GLuint y, GLuint w, GLuint h,
GLCALL(glBindTexture(GL_TEXTURE_2D, _texture_name));
GLCALL(glPixelStorei(GL_UNPACK_ALIGNMENT, 1));
setDirtyRect(Common::Rect(x, y, x+w, y+h));
setDirtyRect(Common::Rect(x, y, x + w, y + h));
if (static_cast<int>(w) * bytesPerPixel() == pitch) {
GLCALL(glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h,

View File

@ -59,10 +59,6 @@ public:
return _surface.h;
}
inline GLuint texture_name() const {
return _texture_name;
}
inline const Graphics::Surface *surface_const() const {
return &_surface;
}