message("* qt/osd")
-SET(THIS_LIB_VERSION 2.9.8)
+SET(THIS_LIB_VERSION 2.9.9)
set(s_qt_osd_headers
osd_base.h
#else
screen_height = SCREEN_HEIGHT;
#endif
-
+#if defined(SCREEN_X_ZOOM)
+ screen_x_zoom = SCREEN_X_ZOOM;
+#endif
+#if defined(SCREEN_Y_ZOOM)
+ screen_y_zoom = SCREEN_Y_ZOOM;
+#endif
screen_width_aspect = WINDOW_WIDTH_ASPECT;
screen_height_aspect = WINDOW_HEIGHT_ASPECT;
max_button = 0;
message("* qt/gui")
-set(THIS_LIB_VERSION 2.10.2)
+set(THIS_LIB_VERSION 2.10.3)
set(s_qt_gui_headers
csp_logger.h
if(using_flags->get_emu()) {
int w, h, n;
- double nd, ww, hh;
+ float nd, ww, hh;
+ float xzoom = using_flags->get_screen_x_zoom();
+ float yzoom = using_flags->get_screen_y_zoom();
n = using_flags->get_config_ptr()->window_mode;
if(n < 0) n = 1;
nd = actionScreenSize[n]->binds->getDoubleValue();
- ww = nd * (double)using_flags->get_screen_width();
- hh = nd * (double)using_flags->get_screen_height();
+ ww = (float)using_flags->get_screen_width();
+ hh = (float)using_flags->get_screen_height();
if((using_flags->get_screen_height_aspect() != using_flags->get_screen_height()) ||
(using_flags->get_screen_width_aspect() != using_flags->get_screen_width())) {
- double par_w = (double)using_flags->get_screen_width_aspect() / (double)using_flags->get_screen_width();
- double par_h = (double)using_flags->get_screen_height_aspect() / (double)using_flags->get_screen_height();
+ float par_w = (float)using_flags->get_screen_width_aspect() / ww;
+ float par_h = (float)using_flags->get_screen_height_aspect() / hh;
//double par = par_h / par_w;
- if(using_flags->get_config_ptr()->window_stretch_type == 1) { // refer to X, scale Y.
- hh = hh * par_h;
- } else if(using_flags->get_config_ptr()->window_stretch_type == 2) { // refer to Y, scale X only
- ww = ww / par_h;
- } else if(using_flags->get_config_ptr()->window_stretch_type == 3) { // Scale both X, Y
- ww = ww * par_w;
- hh = hh * par_h;
+ switch(using_flags->get_config_ptr()->window_stretch_type) {
+ case 0: // refer to X and Y.
+ ww = ww * nd * xzoom;
+ hh = hh * nd * yzoom;
+ break;
+ case 1: // refer to X, scale Y only
+ ww = ww * nd * xzoom;
+ hh = hh * nd * par_h;
+ break;
+ case 2: // refer to Y, scale X only
+ ww = (ww * nd) / par_h * yzoom;
+ hh = hh * nd * yzoom;
+ break;
+ case 3:
+ ww = ((ww * nd) / par_h) * yzoom;
+ hh = ((hh * nd) / par_w) * xzoom;
+ break;
}
+ } else {
+ ww = ww * nd * xzoom;
+ hh = hh * nd * yzoom;
}
w = (int)ww;
h = (int)hh;
int real_screen_width;
int real_screen_height;
+
+ float screen_x_zoom;
+ float screen_y_zoom;
int screen_width_aspect;
int screen_height_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; }
+ float get_screen_x_zoom() { return screen_x_zoom; }
+ float get_screen_y_zoom() { return screen_y_zoom; }
int get_screen_mode_num() { return screen_mode_num; }
int get_max_button() { return max_button; }
screen_width = SCREEN_WIDTH;
screen_height = SCREEN_HEIGHT;
-
+
+ screen_x_zoom = 1.0f;
+ screen_y_zoom = 1.0f;
screen_width_aspect = WINDOW_WIDTH_ASPECT;
screen_height_aspect = WINDOW_HEIGHT_ASPECT;
max_button = 0;
void Object_Menu_Control::set_screen_size(void) {
int w, h;
- double nd, ww, hh;
+ float nd, ww, hh;
+ float xzoom = using_flags->get_screen_x_zoom();
+ float yzoom = using_flags->get_screen_y_zoom();
using_flags->get_config_ptr()->window_mode = getNumber();
nd = getDoubleValue();
- ww = nd * (double)using_flags->get_screen_width();
- hh = nd * (double)using_flags->get_screen_height();
+ ww = (float)using_flags->get_screen_width();
+ hh = (float)using_flags->get_screen_height();
if((using_flags->get_screen_height_aspect() != using_flags->get_screen_height()) ||
(using_flags->get_screen_width_aspect() != using_flags->get_screen_width())) {
- double par_w = (double)using_flags->get_screen_width_aspect() / (double)using_flags->get_screen_width();
- double par_h = (double)using_flags->get_screen_height_aspect() / (double)using_flags->get_screen_height();
- //double par = par_h / par_w;
- if(using_flags->get_config_ptr()->window_stretch_type == 1) { // refer to X, scale Y.
- hh = hh * par_h;
- } else if(using_flags->get_config_ptr()->window_stretch_type == 2) { // refer to Y, scale X only
- ww = ww / par_h;
- } else if(using_flags->get_config_ptr()->window_stretch_type == 3) { // Scale both X, Y
- ww = ww * par_w;
- hh = hh * par_h;
+ float par_w = (float)using_flags->get_screen_width_aspect() / ww;
+ float par_h = (float)using_flags->get_screen_height_aspect() / hh;
+ //float par = par_h / par_w;
+ switch(using_flags->get_config_ptr()->window_stretch_type) {
+ case 0: // refer to X and Y.
+ ww = ww * nd * xzoom;
+ hh = hh * nd * yzoom;
+ break;
+ case 1: // refer to X, scale Y only
+ ww = ww * nd * xzoom;
+ hh = hh * nd * par_h;
+ break;
+ case 2: // refer to Y, scale X only
+ ww = (ww * nd) / par_h * yzoom;
+ hh = hh * nd * yzoom;
+ break;
+ case 3:
+ ww = ((ww * nd) / par_h) * yzoom;
+ hh = ((hh * nd) / par_w) * xzoom;
+ break;
}
+ } else {
+ ww = ww * nd * xzoom;
+ hh = hh * nd * yzoom;
}
w = (int)ww;
h = (int)hh;