Remove more bad uses of dp_xres. Fix a data flow issue

(could end up with "feedback" if modifying the screen bounds)
This commit is contained in:
Henrik Rydgard committed 2014-02-10 15:55:21 +01:00
1 parent c6caff61bf
commit ca9d0ea5cf
8 files changed
+83 -66

No files matched your search

+4 -1
View File
@@ -624,6 +624,7 @@ void NativeRender() {
// Apply the UIContext bounds as a 2D transformation matrix.
Matrix4x4 ortho;
ortho.setOrtho(0.0f, xres, yres, 0.0f, -1.0f, 1.0f);
glsl_bind(UIShader_Get());
glUniformMatrix4fv(UIShader_Get()->u_worldviewproj, 1, GL_FALSE, ortho.getReadPtr());
@@ -782,7 +783,9 @@ void NativeMessageReceived(const char *message, const char *value) {
}
void NativeResized() {
uiContext->SetBounds(Bounds(0, 0, dp_xres, dp_yres));
if (uiContext) {
uiContext->SetBounds(Bounds(0, 0, dp_xres, dp_yres));
}
}
void NativeShutdown() {