mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-28 12:33:04 +00:00
Remove some deadc0de
- No longer worrying about softkeyboard showing on mobile since we have a custom GL touch keyboard - Move some stuff that is desktop-only to that codepath
This commit is contained in:
parent
f7acde244c
commit
be797efce5
@ -23,16 +23,10 @@ bool renderer_shutting_down = false;
|
|||||||
|
|
||||||
volatile unsigned long _backend_vid_dirty = 0;
|
volatile unsigned long _backend_vid_dirty = 0;
|
||||||
|
|
||||||
static int windowWidth = SCANWIDTH*1.5;
|
|
||||||
static int windowHeight = SCANHEIGHT*1.5;
|
|
||||||
|
|
||||||
static int viewportX = 0;
|
static int viewportX = 0;
|
||||||
static int viewportY = 0;
|
static int viewportY = 0;
|
||||||
static int viewportWidth = SCANWIDTH*1.5;
|
static int viewportWidth = SCANWIDTH*1.5;
|
||||||
static int viewportHeight = SCANHEIGHT*1.5;
|
static int viewportHeight = SCANHEIGHT*1.5;
|
||||||
#if MOBILE_DEVICE
|
|
||||||
static int adjustedHeight = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
GLint texSamplerLoc = UNINITIALIZED_GL;
|
GLint texSamplerLoc = UNINITIALIZED_GL;
|
||||||
GLint alphaValue = UNINITIALIZED_GL;
|
GLint alphaValue = UNINITIALIZED_GL;
|
||||||
@ -57,6 +51,8 @@ static GLModel *crtModel = NULL;
|
|||||||
static video_backend_s glvideo_backend = { 0 };
|
static video_backend_s glvideo_backend = { 0 };
|
||||||
|
|
||||||
#if USE_GLUT
|
#if USE_GLUT
|
||||||
|
static int windowWidth = SCANWIDTH*1.5;
|
||||||
|
static int windowHeight = SCANHEIGHT*1.5;
|
||||||
static int glutWindow = -1;
|
static int glutWindow = -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -741,7 +737,7 @@ static void gldriver_render(void) {
|
|||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
#if MOBILE_DEVICE
|
#if MOBILE_DEVICE
|
||||||
glViewport(viewportX, adjustedHeight, viewportWidth, viewportHeight);
|
glViewport(viewportX, viewportY, viewportWidth, viewportHeight);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PERSPECTIVE
|
#if PERSPECTIVE
|
||||||
@ -849,8 +845,10 @@ static void gldriver_render(void) {
|
|||||||
|
|
||||||
static void gldriver_reshape(int w, int h) {
|
static void gldriver_reshape(int w, int h) {
|
||||||
//LOG("reshape to w:%d h:%d", w, h);
|
//LOG("reshape to w:%d h:%d", w, h);
|
||||||
|
#if USE_GLUT
|
||||||
windowWidth = w;
|
windowWidth = w;
|
||||||
windowHeight = h;
|
windowHeight = h;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if MOBILE_DEVICE
|
#if MOBILE_DEVICE
|
||||||
int viewportHeightPrevious = viewportHeight;
|
int viewportHeightPrevious = viewportHeight;
|
||||||
@ -880,14 +878,6 @@ static void gldriver_reshape(int w, int h) {
|
|||||||
//LOG("small viewport : x:%d,y:%d w:%d,h:%d", viewportX, viewportY, viewportWidth, viewportHeight);
|
//LOG("small viewport : x:%d,y:%d w:%d,h:%d", viewportX, viewportY, viewportWidth, viewportHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MOBILE_DEVICE
|
|
||||||
if (viewportHeight < viewportHeightPrevious) {
|
|
||||||
adjustedHeight = viewportHeightPrevious - viewportHeight;
|
|
||||||
} else {
|
|
||||||
adjustedHeight = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
glViewport(viewportX, viewportY, viewportWidth, viewportHeight);
|
glViewport(viewportX, viewportY, viewportWidth, viewportHeight);
|
||||||
|
|
||||||
// Reshape HUD nodes
|
// Reshape HUD nodes
|
||||||
|
Loading…
Reference in New Issue
Block a user