Force X11 scaling to 2X and remove option for now

This commit is contained in:
Aaron Culliney 2017-07-15 13:16:50 -10:00
parent bdbe544c3b
commit 97a98f0c86
3 changed files with 8 additions and 49 deletions

View File

@ -699,9 +699,6 @@ typedef enum interface_enum_t {
OPT_CALIBRATE,
OPT_PATH,
OPT_COLOR,
#if !VIDEO_OPENGL
OPT_VIDEO,
#endif
OPT_VOLUME,
OPT_CAPS,
@ -718,9 +715,6 @@ static const char *options[] =
" --> Calibrate Joystick",
" Path : ",
" Color : ",
#if !VIDEO_OPENGL
" Video : ",
#endif
" Volume : ",
" CAPSlock : ",
};
@ -830,12 +824,6 @@ void c_interface_parameters()
(color_mode == COLOR_INTERP) ? "Interpolated" : "Black/White ");
break;
#if !VIDEO_OPENGL
case OPT_VIDEO:
sprintf(temp, "%s", (a2_video_mode == VIDEO_1X) ? "1X " : (a2_video_mode == VIDEO_2X) ? "2X " : "Fullscreen");
break;
#endif
case OPT_JOYSTICK:
snprintf(temp, TEMPSIZE, "%s", (joy_mode == JOY_KPAD) ? "Emulated on Keypad" : "PC Joystick ");
break;
@ -1008,21 +996,6 @@ void c_interface_parameters()
prefs_setLongValue(PREF_DOMAIN_VIDEO, PREF_COLOR_MODE, color_mode);
break;
#if !VIDEO_OPENGL
case OPT_VIDEO:
if (a2_video_mode == 1)
{
a2_video_mode = NUM_VIDOPTS-1;
}
else
{
--a2_video_mode;
}
extern void video_set_mode(a2_video_mode_t);
video_set_mode(a2_video_mode);
break;
#endif
case OPT_VOLUME:
if (speaker_volume > 0)
{
@ -1094,21 +1067,6 @@ void c_interface_parameters()
prefs_setLongValue(PREF_DOMAIN_VIDEO, PREF_COLOR_MODE, color_mode);
break;
#if !VIDEO_OPENGL
case OPT_VIDEO:
if (a2_video_mode == NUM_VIDOPTS-1)
{
a2_video_mode = 1;
}
else
{
++a2_video_mode;
}
extern void video_set_mode(a2_video_mode_t);
video_set_mode(a2_video_mode);
break;
#endif
case OPT_VOLUME:
speaker_volume++;
if (speaker_volume > 10)

View File

@ -43,7 +43,7 @@ typedef struct A2Color_s {
*/
extern A2Color_s colormap[];
#if !VIDEO_OPENGL
#if VIDEO_X11
// X11 scaling ...
typedef enum a2_video_mode_t {
VIDEO_FULLSCREEN = 0,

View File

@ -13,6 +13,8 @@
*
*/
#define VIDEO_X11 1
#include "common.h"
#include "video/video.h"
@ -31,7 +33,7 @@ static Display *display;
static Window win;
static GC gc;
static unsigned int width, height; /* window size */
static unsigned int scale = 1;
static unsigned int scale = 2;
static int screen_num;
static XVisualInfo visualinfo;
@ -60,7 +62,7 @@ static int bitmap_pad = sizeof(uint32_t);
static video_backend_s xvideo_backend = { 0 };
static bool request_set_mode = false;
static int request_mode = 0;
static a2_video_mode_t request_mode = VIDEO_2X;
typedef struct {
unsigned long flags;
@ -569,10 +571,9 @@ void video_set_mode(a2_video_mode_t mode) {
static void _redo_image(void) {
_destroy_image();
int mode = request_mode;
scale = mode;
if (mode == VIDEO_FULLSCREEN) {
scale = 1; // HACK FIXME for now ................
scale = (int)request_mode;
if (scale == VIDEO_FULLSCREEN) {
scale = 2; // HACK FIXME for now ................
}
width = SCANWIDTH*scale;