about summary refs log tree commit diff
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/client/gfx.c5
-rw-r--r--src/engine/client/ui.c2
-rw-r--r--src/engine/interface.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/engine/client/gfx.c b/src/engine/client/gfx.c
index 945a615e..5d7ca4d8 100644
--- a/src/engine/client/gfx.c
+++ b/src/engine/client/gfx.c
@@ -281,6 +281,11 @@ int gfx_init()
 	return 1;
 }
 
+float gfx_screenaspect()
+{
+    return gfx_screenwidth()/(float)gfx_screenheight();
+}
+
 void gfx_clear_mask(int fill)
 {
 	/*if(fill)
diff --git a/src/engine/client/ui.c b/src/engine/client/ui.c
index ae604a23..9486b2c1 100644
--- a/src/engine/client/ui.c
+++ b/src/engine/client/ui.c
@@ -113,7 +113,7 @@ static float scale = 1.0f;
 #define MEMORY_SIZE 10*1024
 static struct rect memory[MEMORY_SIZE];
 static int memory_used = 0;
-static struct rect screen = { 0.0f, 0.0f, 800.0f, 600.0f };
+static struct rect screen = { 0.0f, 0.0f, 848.0f, 480.0f };
 
 void ui_foreach_rect(rect_fun fun)
 {
diff --git a/src/engine/interface.h b/src/engine/interface.h
index ae6362fe..7b8dd2b5 100644
--- a/src/engine/interface.h
+++ b/src/engine/interface.h
@@ -114,6 +114,8 @@ int gfx_init();
 void gfx_shutdown();
 void gfx_swap();
 
+float gfx_screenaspect();
+
 int gfx_get_video_modes(VIDEO_MODE *list, int maxcount);
 void gfx_set_vsync(int val);