about summary refs log tree commit diff
path: root/src/engine/client/gfx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/client/gfx.cpp')
-rw-r--r--src/engine/client/gfx.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/engine/client/gfx.cpp b/src/engine/client/gfx.cpp
index 657f7874..a691863b 100644
--- a/src/engine/client/gfx.cpp
+++ b/src/engine/client/gfx.cpp
@@ -212,6 +212,8 @@ bool gfx_init()
 		textures[i].next = i+1;
 	textures[MAX_TEXTURES-1].next = -1;
 	
+	//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+	
 	// create null texture, will get id=0
 	gfx_load_texture_raw(4,4,IMG_RGBA,null_texture_data);
 
@@ -221,8 +223,37 @@ bool gfx_init()
 	return true;
 }
 
+video_mode fakemodes[] = {
+	{320,240,8,8,8}, {400,300,8,8,8}, {640,480,8,8,8},
+	{720,400,8,8,8}, {768,576,8,8,8}, {800,600,8,8,8},
+	{1024,600,8,8,8}, {1024,768,8,8,8}, {1152,864,8,8,8},
+	{1280,768,8,8,8}, {1280,800,8,8,8}, {1280,960,8,8,8},
+	{1280,1024,8,8,8}, {1368,768,8,8,8}, {1400,1050,8,8,8},
+	{1440,900,8,8,8}, {1440,1050,8,8,8}, {1600,1000,8,8,8},
+	{1600,1200,8,8,8}, {1680,1050,8,8,8}, {1792,1344,8,8,8},
+	{1800,1440,8,8,8}, {1856,1392,8,8,8}, {1920,1080,8,8,8},
+	{1920,1200,8,8,8}, {1920,1440,8,8,8}, {1920,2400,8,8,8},
+	{2048,1536,8,8,8},
+		
+	{320,240,5,6,5}, {400,300,5,6,5}, {640,480,5,6,5},
+	{720,400,5,6,5}, {768,576,5,6,5}, {800,600,5,6,5},
+	{1024,600,5,6,5}, {1024,768,5,6,5}, {1152,864,5,6,5},
+	{1280,768,5,6,5}, {1280,800,5,6,5}, {1280,960,5,6,5},
+	{1280,1024,5,6,5}, {1368,768,5,6,5}, {1400,1050,5,6,5},
+	{1440,900,5,6,5}, {1440,1050,5,6,5}, {1600,1000,5,6,5},
+	{1600,1200,5,6,5}, {1680,1050,5,6,5}, {1792,1344,5,6,5},
+	{1800,1440,5,6,5}, {1856,1392,5,6,5}, {1920,1080,5,6,5},
+	{1920,1200,5,6,5}, {1920,1440,5,6,5}, {1920,2400,5,6,5},
+	{2048,1536,5,6,5}
+};
+
 int gfx_get_video_modes(video_mode *list, int maxcount)
 {
+	if(config.display_all_modes)
+	{
+		mem_copy(list, fakemodes, sizeof(fakemodes));
+		return min((int)(sizeof(fakemodes)/sizeof(video_mode)), maxcount);
+	}
 	return context.getvideomodes((opengl::videomode *)list, maxcount);
 }