| 342 | } |
| 343 | |
| 344 | void CalcWindowSize(RECT *al) |
| 345 | { |
| 346 | int xres = 256; |
| 347 | if(fullscreen && vmodes[0].special==3) |
| 348 | xres=301; |
| 349 | if(!fullscreen && winspecial==3) |
| 350 | xres=301; |
| 351 | |
| 352 | double screen_width = VNSWID_NU(xres); |
| 353 | double screen_height = FSettings.TotalScanlines(); |
| 354 | if (eoptions & EO_TVASPECT) |
| 355 | screen_width = ceil(screen_height * (screen_width / xres) * (tvAspectX / tvAspectY)); |
| 356 | |
| 357 | al->left = 0; |
| 358 | al->top = 0; |
| 359 | al->right = ceil(screen_width * winsizemulx); |
| 360 | al->bottom = menuYoffset + ceil(screen_height * winsizemuly); |
| 361 | |
| 362 | AdjustWindowRectEx(al, |
| 363 | GetWindowLong(hAppWnd, GWL_STYLE), |
| 364 | GetMenu(hAppWnd) != NULL, |
| 365 | GetWindowLong(hAppWnd, GWL_EXSTYLE) |
| 366 | ); |
| 367 | |
| 368 | al->right -= al->left; |
| 369 | al->left = 0; |
| 370 | al->bottom -= al->top; |
| 371 | al->top=0; |
| 372 | } |
| 373 | |
| 374 | /// Updates the menu items that should only be enabled if a game is loaded. |
| 375 | /// @param enable Flag that indicates whether the menus should be enabled (1) or disabled (0). |
no test coverage detected