use_vm_auto_key_table = false;
support_tv_render = false;
+ real_screen_width = SCREEN_WIDTH;
+ real_screen_height = SCREEN_HEIGHT;
+
+#if defined(SCREEN_FAKE_WIDTH)
+ screen_width = SCREEN_FAKE_WIDTH;
+#else
screen_width = SCREEN_WIDTH;
+#endif
+#if defined(SCREEN_FAKE_HEIGHT)
+ screen_height = SCREEN_FAKE_HEIGHT;
+#else
screen_height = SCREEN_HEIGHT;
+#endif
+
screen_width_aspect = WINDOW_WIDTH_ASPECT;
screen_height_aspect = WINDOW_HEIGHT_ASPECT;
max_button = 0;
int screen_width;
int screen_height;
+ int real_screen_width;
+ int real_screen_height;
+
int screen_width_aspect;
int screen_height_aspect;
bool notify_key_down_lr_shift;
int get_screen_height() { return screen_height; }
int get_screen_width_aspect() { return screen_width_aspect; }
int get_screen_height_aspect() { return screen_height_aspect; }
+ int get_real_screen_width() { return real_screen_width; }
+ int get_real_screen_height() { return real_screen_height; }
+
int get_screen_mode_num() { return screen_mode_num; }
int get_max_button() { return max_button; }
button_desc_t *get_vm_buttons() { return vm_buttons_d; }
)
set_target_properties(CSPgui PROPERTIES
- SOVERSION 2.4.0
- VERSION 2.4.0
+ SOVERSION 2.4.1
+ VERSION 2.4.1
)
INSTALL(TARGETS CSPgui DESTINATION ${LIBCSP_INSTALL_DIR})
endif()
glVertGrids = NULL;
glHorizGrids = NULL;
- vert_lines = using_flags->get_screen_height();
- horiz_pixels = using_flags->get_screen_width();
+ vert_lines = using_flags->get_real_screen_height();
+ horiz_pixels = using_flags->get_real_screen_width();
set_brightness = false;
crt_flag = false;
smoosing = false;
if(using_flags->get_max_button() > 0) {
initButtons();
}
- glHorizGrids = (GLfloat *)malloc(sizeof(float) * (using_flags->get_screen_height() + 2) * 6);
+ glHorizGrids = (GLfloat *)malloc(sizeof(float) * (using_flags->get_real_screen_height() + 2) * 6);
if(glHorizGrids != NULL) {
- doSetGridsHorizonal(using_flags->get_screen_height(), true);
+ doSetGridsHorizonal(using_flags->get_real_screen_height(), true);
}
- glVertGrids = (GLfloat *)malloc(sizeof(float) * (using_flags->get_screen_width() + 2) * 6);
+ glVertGrids = (GLfloat *)malloc(sizeof(float) * (using_flags->get_real_screen_width() + 2) * 6);
if(glVertGrids != NULL) {
- doSetGridsVertical(using_flags->get_screen_width(), true);
+ doSetGridsVertical(using_flags->get_real_screen_width(), true);
}
// Init view
extfunc_2->glClearColor(0.0, 0.0, 0.0, 1.0);
vert_lines = lines;
yf = -screen_height;
if(vert_lines <= 0) return;
- if(vert_lines > using_flags->get_screen_height()) vert_lines = using_flags->get_screen_height();
+ if(vert_lines > using_flags->get_real_screen_height()) vert_lines = using_flags->get_real_screen_height();
delta = (2.0f * screen_height) / (float)vert_lines;
yf = yf - delta * 1.0f;
if((pixels == horiz_pixels) && !force) return;
horiz_pixels = pixels;
if(horiz_pixels <= 0) return;
- if(horiz_pixels > using_flags->get_screen_width()) horiz_pixels = using_flags->get_screen_width();
+ if(horiz_pixels > using_flags->get_real_screen_width()) horiz_pixels = using_flags->get_real_screen_width();
xf = -screen_width;
delta = (2.0f * screen_width) / (float)horiz_pixels;
xf = xf - delta * 0.75f;
if(glVertGrids != NULL) {
- if(horiz_pixels > using_flags->get_screen_width()) horiz_pixels = using_flags->get_screen_width();
+ if(horiz_pixels > using_flags->get_real_screen_width()) horiz_pixels = using_flags->get_real_screen_width();
for(i = 0; i < (horiz_pixels + 1) ; i++) {
glVertGrids[i * 6] = xf; // XBegin
glVertGrids[i * 6 + 3] = xf; // XEnd
void GLDraw_3_0::initFBO(void)
{
- glHorizGrids = (GLfloat *)malloc(sizeof(float) * (using_flags->get_screen_height() + 2) * 6);
+ glHorizGrids = (GLfloat *)malloc(sizeof(float) * (using_flags->get_real_screen_height() + 2) * 6);
if(glHorizGrids != NULL) {
- doSetGridsHorizonal(using_flags->get_screen_height(), true);
+ doSetGridsHorizonal(using_flags->get_real_screen_height(), true);
}
- glVertGrids = (GLfloat *)malloc(sizeof(float) * (using_flags->get_screen_width() + 2) * 6);
+ glVertGrids = (GLfloat *)malloc(sizeof(float) * (using_flags->get_real_screen_width() + 2) * 6);
if(glVertGrids != NULL) {
- doSetGridsVertical(using_flags->get_screen_width(), true);
+ doSetGridsVertical(using_flags->get_real_screen_width(), true);
}
if(using_flags->get_max_button() > 0) {
initButtons();
}
initGridShaders(":/grids_vertex_shader_fixed.glsl", ":/grids_vertex_shader.glsl", ":/grids_fragment_shader.glsl");
- initGridVertexObject(&grids_horizonal_buffer, &grids_horizonal_vertex, using_flags->get_screen_height() + 3);
- doSetGridsHorizonal(using_flags->get_screen_height(), true);
+ initGridVertexObject(&grids_horizonal_buffer, &grids_horizonal_vertex, using_flags->get_real_screen_height() + 3);
+ doSetGridsHorizonal(using_flags->get_real_screen_height(), true);
- initGridVertexObject(&grids_vertical_buffer, &grids_vertical_vertex, using_flags->get_screen_width() + 3);
- doSetGridsVertical(using_flags->get_screen_width(), true);
+ initGridVertexObject(&grids_vertical_buffer, &grids_vertical_vertex, using_flags->get_real_screen_width() + 3);
+ doSetGridsVertical(using_flags->get_real_screen_width(), true);
do_set_texture_size(NULL, -1, -1);
p_wid->doneCurrent();
# if defined(_FM77AV40) || defined(_FM77AV40EX) || defined(_FM77AV40SX) || defined(_FM77L4)
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 400
+#undef SCREEN_FAKE_WIDTH
+#undef SCREEN_FAKE_HEIGHT
#else
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 200
+#define SCREEN_FAKE_WIDTH 640
+#define SCREEN_FAKE_HEIGHT 400
#endif
#define WINDOW_HEIGHT_ASPECT 480
#define HAS_MC6809