trunk/src/osd/sdl/draw13.c
| r244625 | r244626 | |
| 146 | 146 | : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_sdl_renderer(NULL), |
| 147 | 147 | m_last_hofs(0), m_last_vofs(0), |
| 148 | 148 | m_width(0), m_height(0), |
| 149 | | m_blitwidth(0), m_blitheight(0), |
| 149 | m_blit_dim(0,0), |
| 150 | 150 | m_last_blit_time(0), m_last_blit_pixels(0) |
| 151 | 151 | {} |
| 152 | 152 | |
| r244625 | r244626 | |
| 156 | 156 | /* virtual */ void destroy(); |
| 157 | 157 | /* virtual */ render_primitive_list *get_primitives() |
| 158 | 158 | { |
| 159 | | int nw = 0; int nh = 0; |
| 160 | | window().blit_surface_size(nw, nh); |
| 161 | | if (nw != m_blitwidth || nh != m_blitheight) |
| 159 | osd_dim nd = window().blit_surface_size(); |
| 160 | if (nd != m_blit_dim) |
| 162 | 161 | { |
| 163 | | m_blitwidth = nw; m_blitheight = nh; |
| 162 | m_blit_dim = nd; |
| 164 | 163 | notify_changed(); |
| 165 | 164 | } |
| 166 | | window().target()->set_bounds(m_blitwidth, m_blitheight, window().aspect()); |
| 165 | window().target()->set_bounds(m_blit_dim.width(), m_blit_dim.height(), window().aspect()); |
| 167 | 166 | return &window().target()->get_primitives(); |
| 168 | 167 | } |
| 169 | 168 | |
| r244625 | r244626 | |
| 193 | 192 | int m_width; |
| 194 | 193 | int m_height; |
| 195 | 194 | |
| 196 | | int m_blitwidth; |
| 197 | | int m_blitheight; |
| 195 | osd_dim m_blit_dim; |
| 198 | 196 | |
| 199 | 197 | // Stats |
| 200 | 198 | INT64 m_last_blit_time; |
| r244625 | r244626 | |
| 649 | 647 | { |
| 650 | 648 | *xt = x - m_last_hofs; |
| 651 | 649 | *yt = y - m_last_vofs; |
| 652 | | if (*xt<0 || *xt >= m_blitwidth) |
| 650 | if (*xt<0 || *xt >= m_blit_dim.width()) |
| 653 | 651 | return 0; |
| 654 | | if (*yt<0 || *yt >= m_blitheight) |
| 652 | if (*yt<0 || *yt >= m_blit_dim.height()) |
| 655 | 653 | return 0; |
| 656 | 654 | return 1; |
| 657 | 655 | } |
| r244625 | r244626 | |
| 724 | 722 | |
| 725 | 723 | if (video_config.centerv) |
| 726 | 724 | { |
| 727 | | vofs = (ch - m_blitheight) / 2.0f; |
| 725 | vofs = (ch - m_blit_dim.height()) / 2.0f; |
| 728 | 726 | } |
| 729 | 727 | if (video_config.centerh) |
| 730 | 728 | { |
| 731 | | hofs = (cw - m_blitwidth) / 2.0f; |
| 729 | hofs = (cw - m_blit_dim.width()) / 2.0f; |
| 732 | 730 | } |
| 733 | 731 | } |
| 734 | 732 | |
trunk/src/osd/sdl/drawogl.c
| r244625 | r244626 | |
| 487 | 487 | sdl_info_ogl(osd_window *window) |
| 488 | 488 | : osd_renderer(window, FLAG_NEEDS_OPENGL), m_blittimer(0), |
| 489 | 489 | m_width(0), m_height(0), |
| 490 | | m_blitwidth(0), m_blitheight(0), |
| 490 | m_blit_dim(0, 0), |
| 491 | 491 | m_gl_context(NULL), |
| 492 | 492 | m_initialized(0), |
| 493 | 493 | m_last_blendmode(0), |
| r244625 | r244626 | |
| 519 | 519 | /* virtual */ void destroy(); |
| 520 | 520 | /* virtual */ render_primitive_list *get_primitives() |
| 521 | 521 | { |
| 522 | | int nw = 0; int nh = 0; |
| 523 | 522 | #ifdef OSD_WINDOWS |
| 524 | | window().get_size(nw, nh); |
| 523 | osd_dim nd = window().get_size(); |
| 525 | 524 | #else |
| 526 | | window().blit_surface_size(nw, nh); |
| 525 | osd_dim nd = window().blit_surface_size(); |
| 527 | 526 | #endif |
| 528 | | if (nw != m_blitwidth || nh != m_blitheight) |
| 527 | if (nd != m_blit_dim) |
| 529 | 528 | { |
| 530 | | m_blitwidth = nw; m_blitheight = nh; |
| 529 | m_blit_dim = nd; |
| 531 | 530 | notify_changed(); |
| 532 | 531 | } |
| 533 | | window().target()->set_bounds(m_blitwidth, m_blitheight, window().aspect()); |
| 532 | window().target()->set_bounds(m_blit_dim.width(), m_blit_dim.height(), window().aspect()); |
| 534 | 533 | return &window().target()->get_primitives(); |
| 535 | 534 | } |
| 536 | 535 | |
| r244625 | r244626 | |
| 562 | 561 | INT32 m_blittimer; |
| 563 | 562 | int m_width; |
| 564 | 563 | int m_height; |
| 565 | | int m_blitwidth; |
| 566 | | int m_blitheight; |
| 564 | osd_dim m_blit_dim; |
| 567 | 565 | |
| 568 | 566 | osd_gl_context *m_gl_context; |
| 569 | 567 | |
| r244625 | r244626 | |
| 1070 | 1068 | { |
| 1071 | 1069 | *xt = x - m_last_hofs; |
| 1072 | 1070 | *yt = y - m_last_vofs; |
| 1073 | | if (*xt<0 || *xt >= m_blitwidth) |
| 1071 | if (*xt<0 || *xt >= m_blit_dim.width()) |
| 1074 | 1072 | return 0; |
| 1075 | | if (*yt<0 || *yt >= m_blitheight) |
| 1073 | if (*yt<0 || *yt >= m_blit_dim.height()) |
| 1076 | 1074 | return 0; |
| 1077 | 1075 | return 1; |
| 1078 | 1076 | } |
| r244625 | r244626 | |
| 1612 | 1610 | |
| 1613 | 1611 | if (video_config.centerv) |
| 1614 | 1612 | { |
| 1615 | | vofs = (ch - m_blitheight) / 2.0f; |
| 1613 | vofs = (ch - m_blit_dim.height()) / 2.0f; |
| 1616 | 1614 | } |
| 1617 | 1615 | if (video_config.centerh) |
| 1618 | 1616 | { |
| 1619 | | hofs = (cw - m_blitwidth) / 2.0f; |
| 1617 | hofs = (cw - m_blit_dim.width()) / 2.0f; |
| 1620 | 1618 | } |
| 1621 | 1619 | } |
| 1622 | 1620 | #else |
| r244625 | r244626 | |
| 2185 | 2183 | { |
| 2186 | 2184 | int uniform_location; |
| 2187 | 2185 | int i; |
| 2188 | | int surf_w_pow2 = get_valid_pow2_value (m_blitwidth, texture->texpow2); |
| 2189 | | int surf_h_pow2 = get_valid_pow2_value (m_blitheight, texture->texpow2); |
| 2186 | int surf_w_pow2 = get_valid_pow2_value (m_blit_dim.width(), texture->texpow2); |
| 2187 | int surf_h_pow2 = get_valid_pow2_value (m_blit_dim.height(), texture->texpow2); |
| 2190 | 2188 | |
| 2191 | 2189 | assert ( texture->type==TEXTURE_TYPE_SHADER ); |
| 2192 | 2190 | |
| r244625 | r244626 | |
| 2233 | 2231 | pfn_glUniform2fvARB(uniform_location, 1, &(color_texture_pow2_sz[0])); |
| 2234 | 2232 | GL_CHECK_ERROR_NORMAL(); |
| 2235 | 2233 | |
| 2236 | | GLfloat screen_texture_sz[2] = { (GLfloat) m_blitwidth, (GLfloat) m_blitheight }; |
| 2234 | GLfloat screen_texture_sz[2] = { (GLfloat) m_blit_dim.width(), (GLfloat) m_blit_dim.height() }; |
| 2237 | 2235 | uniform_location = pfn_glGetUniformLocationARB(m_glsl_program[i], "screen_texture_sz"); |
| 2238 | 2236 | pfn_glUniform2fvARB(uniform_location, 1, &(screen_texture_sz[0])); |
| 2239 | 2237 | GL_CHECK_ERROR_NORMAL(); |
trunk/src/osd/sdl/drawsdl.c
| r244625 | r244626 | |
| 64 | 64 | //m_hw_scale_height(0), |
| 65 | 65 | m_last_hofs(0), |
| 66 | 66 | m_last_vofs(0), |
| 67 | | m_blitwidth(0), |
| 68 | | m_blitheight(0), |
| 69 | | m_last_width(0), |
| 70 | | m_last_height(0) |
| 67 | m_blit_dim(0, 0), |
| 68 | m_last_dim(0, 0) |
| 71 | 69 | { } |
| 72 | 70 | |
| 73 | 71 | /* virtual */ int create(); |
| r244625 | r244626 | |
| 76 | 74 | /* virtual */ void destroy(); |
| 77 | 75 | /* virtual */ render_primitive_list *get_primitives() |
| 78 | 76 | { |
| 79 | | int nw = 0; int nh = 0; |
| 80 | | window().blit_surface_size(nw, nh); |
| 81 | | if (nw != m_blitwidth || nh != m_blitheight) |
| 77 | osd_dim nd = window().blit_surface_size(); |
| 78 | if (nd != m_blit_dim) |
| 82 | 79 | { |
| 83 | | m_blitwidth = nw; m_blitheight = nh; |
| 80 | m_blit_dim = nd; |
| 84 | 81 | notify_changed(); |
| 85 | 82 | } |
| 86 | | window().target()->set_bounds(m_blitwidth, m_blitheight, window().aspect()); |
| 83 | window().target()->set_bounds(m_blit_dim.width(), m_blit_dim.height(), window().aspect()); |
| 87 | 84 | return &window().target()->get_primitives(); |
| 88 | 85 | } |
| 89 | 86 | |
| r244625 | r244626 | |
| 91 | 88 | void destroy_all_textures(); |
| 92 | 89 | void yuv_init(); |
| 93 | 90 | #if (SDLMAME_SDL2) |
| 94 | | void setup_texture(int tempwidth, int tempheight); |
| 91 | void setup_texture(const osd_dim &size); |
| 95 | 92 | #endif |
| 96 | 93 | void yuv_lookup_set(unsigned int pen, unsigned char red, |
| 97 | 94 | unsigned char green, unsigned char blue); |
| r244625 | r244626 | |
| 118 | 115 | |
| 119 | 116 | int m_last_hofs; |
| 120 | 117 | int m_last_vofs; |
| 121 | | int m_blitwidth; |
| 122 | | int m_blitheight; |
| 123 | | int m_last_width; |
| 124 | | int m_last_height; |
| 118 | osd_dim m_blit_dim; |
| 119 | osd_dim m_last_dim; |
| 125 | 120 | }; |
| 126 | 121 | |
| 127 | 122 | struct sdl_scale_mode |
| r244625 | r244626 | |
| 269 | 264 | //============================================================ |
| 270 | 265 | |
| 271 | 266 | #if (SDLMAME_SDL2) |
| 272 | | void sdl_info::setup_texture(int tempwidth, int tempheight) |
| 267 | void sdl_info::setup_texture(const osd_dim &size) |
| 273 | 268 | { |
| 274 | 269 | const sdl_scale_mode *sdl_sm = &scale_modes[video_config.scale_mode]; |
| 275 | 270 | SDL_DisplayMode mode; |
| r244625 | r244626 | |
| 288 | 283 | |
| 289 | 284 | if (sdl_sm->is_scale) |
| 290 | 285 | { |
| 291 | | int m_hw_scale_width =0; |
| 286 | int m_hw_scale_width = 0; |
| 292 | 287 | int m_hw_scale_height = 0; |
| 293 | 288 | |
| 294 | 289 | window().target()->compute_minimum_size(m_hw_scale_width, m_hw_scale_height); |
| r244625 | r244626 | |
| 312 | 307 | else |
| 313 | 308 | { |
| 314 | 309 | m_texture_id = SDL_CreateTexture(m_sdl_renderer,fmt, SDL_TEXTUREACCESS_STREAMING, |
| 315 | | tempwidth, tempheight); |
| 310 | size.width(), size.height()); |
| 316 | 311 | } |
| 317 | 312 | } |
| 318 | 313 | #endif |
| r244625 | r244626 | |
| 523 | 518 | { |
| 524 | 519 | *xt = x - m_last_hofs; |
| 525 | 520 | *yt = y - m_last_vofs; |
| 526 | | if (*xt<0 || *xt >= m_blitwidth) |
| 521 | if (*xt<0 || *xt >= m_blit_dim.width()) |
| 527 | 522 | return 0; |
| 528 | | if (*yt<0 || *yt >= m_blitheight) |
| 523 | if (*yt<0 || *yt >= m_blit_dim.height()) |
| 529 | 524 | return 0; |
| 530 | 525 | return 1; |
| 531 | 526 | } |
| r244625 | r244626 | |
| 571 | 566 | } |
| 572 | 567 | |
| 573 | 568 | osd_dim wdim = window().get_size(); |
| 574 | | if (has_flags(FI_CHANGED) || (wdim.width() != m_last_width) || (wdim.height() != m_last_height)) |
| 569 | if (has_flags(FI_CHANGED) || (wdim != m_last_dim)) |
| 575 | 570 | { |
| 576 | 571 | destroy_all_textures(); |
| 577 | 572 | clear_flags(FI_CHANGED); |
| 578 | 573 | m_blittimer = 3; |
| 579 | | m_last_width = wdim.width(); |
| 580 | | m_last_height = wdim.height(); |
| 574 | m_last_dim = wdim; |
| 581 | 575 | #if (SDLMAME_SDL2) |
| 582 | 576 | SDL_RenderSetViewport(m_sdl_renderer, NULL); |
| 583 | 577 | if (m_texture_id != NULL) |
| 584 | 578 | SDL_DestroyTexture(m_texture_id); |
| 585 | | setup_texture(m_blitwidth, m_blitheight); |
| 579 | setup_texture(m_blit_dim); |
| 586 | 580 | m_blittimer = 3; |
| 587 | 581 | #else |
| 588 | 582 | const sdl_scale_mode *sdl_sm = &scale_modes[video_config.scale_mode]; |
| r244625 | r244626 | |
| 665 | 659 | #endif |
| 666 | 660 | // get ready to center the image |
| 667 | 661 | vofs = hofs = 0; |
| 668 | | blitwidth = m_blitwidth; |
| 669 | | blitheight = m_blitheight; |
| 662 | blitwidth = m_blit_dim.width(); |
| 663 | blitheight = m_blit_dim.height(); |
| 670 | 664 | |
| 671 | 665 | ch = wdim.height(); |
| 672 | 666 | cw = wdim.width(); |
| r244625 | r244626 | |
| 678 | 672 | } |
| 679 | 673 | else if (video_config.centerv) |
| 680 | 674 | { |
| 681 | | vofs = (ch - m_blitheight) / 2; |
| 675 | vofs = (ch - m_blit_dim.height()) / 2; |
| 682 | 676 | } |
| 683 | 677 | |
| 684 | 678 | if (blitwidth > cw) |
| r244625 | r244626 | |
| 687 | 681 | } |
| 688 | 682 | else if (video_config.centerh) |
| 689 | 683 | { |
| 690 | | hofs = (cw - m_blitwidth) / 2; |
| 684 | hofs = (cw - m_blit_dim.width()) / 2; |
| 691 | 685 | } |
| 692 | 686 | |
| 693 | 687 | m_last_hofs = hofs; |
trunk/src/osd/sdl/window.c
| r244625 | r244626 | |
| 382 | 382 | return (fabs(desired_aspect - aspect0) < fabs(desired_aspect - aspect1)) ? 0 : 1; |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | | void sdl_window_info::blit_surface_size(int &blitwidth, int &blitheight) |
| 385 | osd_dim sdl_window_info::blit_surface_size() |
| 386 | 386 | { |
| 387 | 387 | osd_dim window_dim = get_size(); |
| 388 | 388 | |
| r244625 | r244626 | |
| 455 | 455 | && (video_config.scale_mode == VIDEO_SCALE_MODE_NONE )) |
| 456 | 456 | newwidth = window_dim.width(); |
| 457 | 457 | |
| 458 | | blitwidth = newwidth; |
| 459 | | blitheight = newheight; |
| 458 | return osd_dim(newwidth, newheight); |
| 460 | 459 | } |
| 461 | 460 | |
| 462 | 461 | |
| r244625 | r244626 | |
| 735 | 734 | m_target = m_machine.render().target_alloc(); |
| 736 | 735 | |
| 737 | 736 | // set the specific view |
| 738 | | set_starting_view(m_machine, m_index, options.view(), options.view(m_index)); |
| 737 | set_starting_view(m_index, options.view(), options.view(m_index)); |
| 739 | 738 | |
| 740 | 739 | // make the window title |
| 741 | 740 | if (video_config.numscreens == 1) |
| r244625 | r244626 | |
| 1009 | 1008 | |
| 1010 | 1009 | // see if the games video mode has changed |
| 1011 | 1010 | m_target->compute_minimum_size(tempwidth, tempheight); |
| 1012 | | if (tempwidth != m_minwidth || tempheight != m_minheight) |
| 1011 | if (osd_dim(tempwidth, tempheight) != m_minimum_dim) |
| 1013 | 1012 | { |
| 1014 | | m_minwidth = tempwidth; |
| 1015 | | m_minheight = tempheight; |
| 1013 | m_minimum_dim = osd_dim(tempwidth, tempheight); |
| 1016 | 1014 | |
| 1017 | 1015 | if (!this->m_fullscreen) |
| 1018 | 1016 | { |
| r244625 | r244626 | |
| 1050 | 1048 | // (main thread) |
| 1051 | 1049 | //============================================================ |
| 1052 | 1050 | |
| 1053 | | void sdl_window_info::set_starting_view(running_machine &machine, int index, const char *defview, const char *view) |
| 1051 | void sdl_window_info::set_starting_view(int index, const char *defview, const char *view) |
| 1054 | 1052 | { |
| 1055 | 1053 | int viewindex; |
| 1056 | 1054 | |
| r244625 | r244626 | |
| 1394 | 1392 | INT32 viswidth, visheight; |
| 1395 | 1393 | INT32 adjwidth, adjheight; |
| 1396 | 1394 | float pixel_aspect; |
| 1395 | sdl_monitor_info *monitor = m_monitor; |
| 1397 | 1396 | |
| 1398 | 1397 | // get the pixel aspect ratio for the target monitor |
| 1399 | | pixel_aspect = m_monitor->aspect(); |
| 1398 | pixel_aspect = monitor->aspect(); |
| 1400 | 1399 | |
| 1401 | 1400 | // determine the proposed width/height |
| 1402 | 1401 | propwidth = rect.width() - extrawidth; |
| r244625 | r244626 | |
| 1435 | 1434 | // clamp against the maximum (fit on one screen for full screen mode) |
| 1436 | 1435 | if (m_fullscreen) |
| 1437 | 1436 | { |
| 1438 | | maxwidth = m_monitor->position_size().width() - extrawidth; |
| 1439 | | maxheight = m_monitor->position_size().height() - extraheight; |
| 1437 | maxwidth = monitor->position_size().width() - extrawidth; |
| 1438 | maxheight = monitor->position_size().height() - extraheight; |
| 1440 | 1439 | } |
| 1441 | 1440 | else |
| 1442 | 1441 | { |
| 1443 | | maxwidth = m_monitor->position_size().width() - extrawidth; |
| 1444 | | maxheight = m_monitor->position_size().height() - extraheight; |
| 1442 | maxwidth = monitor->usuable_position_size().width() - extrawidth; |
| 1443 | maxheight = monitor->usuable_position_size().height() - extraheight; |
| 1445 | 1444 | |
| 1446 | 1445 | // further clamp to the maximum width/height in the window |
| 1447 | 1446 | if (m_win_config.width != 0) |
trunk/src/osd/sdl/window.h
| r244625 | r244626 | |
| 44 | 44 | m_resize_height(0), |
| 45 | 45 | m_last_resize(0), |
| 46 | 46 | #endif |
| 47 | | m_minwidth(0), m_minheight(0), |
| 47 | m_minimum_dim(0,0), |
| 48 | 48 | m_windowed_dim(0,0), |
| 49 | 49 | m_rendered_event(0), m_target(0), |
| 50 | 50 | #if (SDLMAME_SDL2) |
| r244625 | r244626 | |
| 104 | 104 | SDL_Surface *sdl_surface() { return m_sdlsurf; } |
| 105 | 105 | #endif |
| 106 | 106 | |
| 107 | | void blit_surface_size(int &blitwidth, int &blitheight); |
| 107 | osd_dim blit_surface_size(); |
| 108 | 108 | int prescale() const { return m_prescale; } |
| 109 | 109 | |
| 110 | 110 | // Pointer to next window |
| r244625 | r244626 | |
| 122 | 122 | char m_title[256]; |
| 123 | 123 | int m_startmaximized; |
| 124 | 124 | |
| 125 | | // diverse flags |
| 126 | | int m_minwidth, m_minheight; |
| 125 | // dimensions |
| 126 | osd_dim m_minimum_dim; |
| 127 | 127 | osd_dim m_windowed_dim; |
| 128 | 128 | |
| 129 | 129 | // rendering info |
| r244625 | r244626 | |
| 153 | 153 | private: |
| 154 | 154 | int wnd_extra_width(); |
| 155 | 155 | int wnd_extra_height(); |
| 156 | | void set_starting_view(running_machine &machine, int index, const char *defview, const char *view); |
| 156 | void set_starting_view(int index, const char *defview, const char *view); |
| 157 | 157 | osd_rect constrain_to_aspect_ratio(const osd_rect &rect, int adjustment); |
| 158 | 158 | osd_dim get_min_bounds(int constrain); |
| 159 | 159 | osd_dim get_max_bounds(int constrain); |
trunk/src/osd/windows/window.c
| r244625 | r244626 | |
| 677 | 677 | |
| 678 | 678 | // set the specific view |
| 679 | 679 | windows_options &options = downcast<windows_options &>(machine.options()); |
| 680 | | window->set_starting_view(index, options.view(index)); |
| 681 | 680 | |
| 681 | const char *defview = options.view(); |
| 682 | window->set_starting_view(index, defview, options.view(index)); |
| 683 | |
| 682 | 684 | // remember the current values in case they change |
| 683 | 685 | window->m_targetview = window->m_target->view(); |
| 684 | 686 | window->m_targetorient = window->m_target->orientation(); |
| r244625 | r244626 | |
| 898 | 900 | // (main thread) |
| 899 | 901 | //============================================================ |
| 900 | 902 | |
| 901 | | void win_window_info::set_starting_view(int index, const char *view) |
| 903 | void win_window_info::set_starting_view(int index, const char *defview, const char *view) |
| 902 | 904 | { |
| 903 | | const char *defview = downcast<windows_options &>(machine().options()).view(); |
| 904 | 905 | int viewindex; |
| 905 | 906 | |
| 906 | 907 | assert(GetCurrentThreadId() == main_threadid); |
| r244625 | r244626 | |
| 910 | 911 | view = defview; |
| 911 | 912 | |
| 912 | 913 | // query the video system to help us pick a view |
| 913 | | viewindex = m_target->configured_view(view, index, video_config.numscreens); |
| 914 | viewindex = target()->configured_view(view, index, video_config.numscreens); |
| 914 | 915 | |
| 915 | 916 | // set the view |
| 916 | | m_target->set_view(viewindex); |
| 917 | target()->set_view(viewindex); |
| 917 | 918 | } |
| 918 | 919 | |
| 919 | 920 | |
| 920 | | |
| 921 | 921 | //============================================================ |
| 922 | 922 | // winwindow_ui_pause_from_main_thread |
| 923 | 923 | // (main thread) |
| r244625 | r244626 | |
| 1515 | 1515 | |
| 1516 | 1516 | osd_rect win_window_info::constrain_to_aspect_ratio(const osd_rect &rect, int adjustment) |
| 1517 | 1517 | { |
| 1518 | | win_monitor_info *monitor = winwindow_video_window_monitor(&rect); |
| 1519 | 1518 | INT32 extrawidth = wnd_extra_width(); |
| 1520 | 1519 | INT32 extraheight = wnd_extra_height(); |
| 1521 | 1520 | INT32 propwidth, propheight; |
| r244625 | r244626 | |
| 1524 | 1523 | INT32 viswidth, visheight; |
| 1525 | 1524 | INT32 adjwidth, adjheight; |
| 1526 | 1525 | float pixel_aspect; |
| 1526 | win_monitor_info *monitor = winwindow_video_window_monitor(&rect); |
| 1527 | 1527 | |
| 1528 | 1528 | assert(GetCurrentThreadId() == window_threadid); |
| 1529 | 1529 | |
trunk/src/osd/windows/window.h
| r244625 | r244626 | |
| 53 | 53 | return GetMenu(m_hwnd) ? true : false; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | | /* virtual */ void get_size(int &w, int &h) |
| 56 | /* virtual */ osd_dim get_size() |
| 57 | 57 | { |
| 58 | 58 | RECT client; |
| 59 | 59 | GetClientRect(m_hwnd, &client); |
| 60 | | w = client.right - client.left; |
| 61 | | h = client.bottom - client.top; |
| 60 | return osd_dim(client.right - client.left, client.bottom - client.top); |
| 62 | 61 | } |
| 63 | 62 | |
| 64 | 63 | win_monitor_info *monitor() const { return m_monitor; } |
| r244625 | r244626 | |
| 110 | 109 | private: |
| 111 | 110 | void draw_video_contents(HDC dc, int update); |
| 112 | 111 | int complete_create(); |
| 113 | | void set_starting_view(int index, const char *view); |
| 112 | void set_starting_view(int index, const char *defview, const char *view); |
| 114 | 113 | int wnd_extra_width(); |
| 115 | 114 | int wnd_extra_height(); |
| 116 | 115 | osd_rect constrain_to_aspect_ratio(const osd_rect &rect, int adjustment); |