| 644 | } |
| 645 | |
| 646 | void SDLWindow::SetBorderless(bool isBorderless, bool maximized) |
| 647 | { |
| 648 | if (IsFullscreen()) |
| 649 | SetIsFullscreen(false); |
| 650 | |
| 651 | // Fixes issue of borderless window not going full screen |
| 652 | if (IsMaximized()) |
| 653 | Restore(); |
| 654 | |
| 655 | _settings.HasBorder = !isBorderless; |
| 656 | |
| 657 | BringToFront(); |
| 658 | |
| 659 | SDL_SetWindowBordered(_window, !isBorderless ? true : false); |
| 660 | if (maximized) |
| 661 | Maximize(); |
| 662 | else |
| 663 | Focus(); |
| 664 | |
| 665 | CheckForWindowResize(); |
| 666 | } |
| 667 | |
| 668 | void SDLWindow::Restore() |
| 669 | { |
no test coverage detected