mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-06-26 00:29:27 +00:00
Force X11 scaling to 2X and remove option for now
This commit is contained in:
parent
bdbe544c3b
commit
97a98f0c86
|
@ -699,9 +699,6 @@ typedef enum interface_enum_t {
|
||||||
OPT_CALIBRATE,
|
OPT_CALIBRATE,
|
||||||
OPT_PATH,
|
OPT_PATH,
|
||||||
OPT_COLOR,
|
OPT_COLOR,
|
||||||
#if !VIDEO_OPENGL
|
|
||||||
OPT_VIDEO,
|
|
||||||
#endif
|
|
||||||
OPT_VOLUME,
|
OPT_VOLUME,
|
||||||
OPT_CAPS,
|
OPT_CAPS,
|
||||||
|
|
||||||
|
@ -718,9 +715,6 @@ static const char *options[] =
|
||||||
" --> Calibrate Joystick",
|
" --> Calibrate Joystick",
|
||||||
" Path : ",
|
" Path : ",
|
||||||
" Color : ",
|
" Color : ",
|
||||||
#if !VIDEO_OPENGL
|
|
||||||
" Video : ",
|
|
||||||
#endif
|
|
||||||
" Volume : ",
|
" Volume : ",
|
||||||
" CAPSlock : ",
|
" CAPSlock : ",
|
||||||
};
|
};
|
||||||
|
@ -830,12 +824,6 @@ void c_interface_parameters()
|
||||||
(color_mode == COLOR_INTERP) ? "Interpolated" : "Black/White ");
|
(color_mode == COLOR_INTERP) ? "Interpolated" : "Black/White ");
|
||||||
break;
|
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:
|
case OPT_JOYSTICK:
|
||||||
snprintf(temp, TEMPSIZE, "%s", (joy_mode == JOY_KPAD) ? "Emulated on Keypad" : "PC Joystick ");
|
snprintf(temp, TEMPSIZE, "%s", (joy_mode == JOY_KPAD) ? "Emulated on Keypad" : "PC Joystick ");
|
||||||
break;
|
break;
|
||||||
|
@ -1008,21 +996,6 @@ void c_interface_parameters()
|
||||||
prefs_setLongValue(PREF_DOMAIN_VIDEO, PREF_COLOR_MODE, color_mode);
|
prefs_setLongValue(PREF_DOMAIN_VIDEO, PREF_COLOR_MODE, color_mode);
|
||||||
break;
|
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:
|
case OPT_VOLUME:
|
||||||
if (speaker_volume > 0)
|
if (speaker_volume > 0)
|
||||||
{
|
{
|
||||||
|
@ -1094,21 +1067,6 @@ void c_interface_parameters()
|
||||||
prefs_setLongValue(PREF_DOMAIN_VIDEO, PREF_COLOR_MODE, color_mode);
|
prefs_setLongValue(PREF_DOMAIN_VIDEO, PREF_COLOR_MODE, color_mode);
|
||||||
break;
|
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:
|
case OPT_VOLUME:
|
||||||
speaker_volume++;
|
speaker_volume++;
|
||||||
if (speaker_volume > 10)
|
if (speaker_volume > 10)
|
||||||
|
|
|
@ -43,7 +43,7 @@ typedef struct A2Color_s {
|
||||||
*/
|
*/
|
||||||
extern A2Color_s colormap[];
|
extern A2Color_s colormap[];
|
||||||
|
|
||||||
#if !VIDEO_OPENGL
|
#if VIDEO_X11
|
||||||
// X11 scaling ...
|
// X11 scaling ...
|
||||||
typedef enum a2_video_mode_t {
|
typedef enum a2_video_mode_t {
|
||||||
VIDEO_FULLSCREEN = 0,
|
VIDEO_FULLSCREEN = 0,
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define VIDEO_X11 1
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "video/video.h"
|
#include "video/video.h"
|
||||||
|
|
||||||
|
@ -31,7 +33,7 @@ static Display *display;
|
||||||
static Window win;
|
static Window win;
|
||||||
static GC gc;
|
static GC gc;
|
||||||
static unsigned int width, height; /* window size */
|
static unsigned int width, height; /* window size */
|
||||||
static unsigned int scale = 1;
|
static unsigned int scale = 2;
|
||||||
|
|
||||||
static int screen_num;
|
static int screen_num;
|
||||||
static XVisualInfo visualinfo;
|
static XVisualInfo visualinfo;
|
||||||
|
@ -60,7 +62,7 @@ static int bitmap_pad = sizeof(uint32_t);
|
||||||
|
|
||||||
static video_backend_s xvideo_backend = { 0 };
|
static video_backend_s xvideo_backend = { 0 };
|
||||||
static bool request_set_mode = false;
|
static bool request_set_mode = false;
|
||||||
static int request_mode = 0;
|
static a2_video_mode_t request_mode = VIDEO_2X;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -569,10 +571,9 @@ void video_set_mode(a2_video_mode_t mode) {
|
||||||
static void _redo_image(void) {
|
static void _redo_image(void) {
|
||||||
_destroy_image();
|
_destroy_image();
|
||||||
|
|
||||||
int mode = request_mode;
|
scale = (int)request_mode;
|
||||||
scale = mode;
|
if (scale == VIDEO_FULLSCREEN) {
|
||||||
if (mode == VIDEO_FULLSCREEN) {
|
scale = 2; // HACK FIXME for now ................
|
||||||
scale = 1; // HACK FIXME for now ................
|
|
||||||
}
|
}
|
||||||
|
|
||||||
width = SCANWIDTH*scale;
|
width = SCANWIDTH*scale;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user