| 396 | #pragma mark - Frame limit dropdown |
| 397 | |
| 398 | static void frameLimitMouseDown(const Window& self, [[maybe_unused]] WidgetIndex_t wi) |
| 399 | { |
| 400 | auto& dropdown = self.widgets[Widx::frame_limit]; |
| 401 | Dropdown::show(self.x + dropdown.left, self.y + dropdown.top, dropdown.width(), dropdown.height(), self.getColour(WindowColour::secondary), 3, 0x80); |
| 402 | |
| 403 | Dropdown::add(0, StringIds::dropdown_stringid, StringIds::frameRateLimitInternal); |
| 404 | Dropdown::add(1, StringIds::dropdown_stringid, StringIds::frameRateLimitVsync); |
| 405 | Dropdown::add(2, StringIds::dropdown_stringid, StringIds::frameRateLimitUnrestricted); |
| 406 | |
| 407 | auto activeItem = 0U; |
| 408 | if (Config::get().uncapFPS) |
| 409 | { |
| 410 | activeItem = Config::get().display.vsync ? 1 : 2; |
| 411 | } |
| 412 | |
| 413 | Dropdown::setItemSelected(activeItem); |
| 414 | } |
| 415 | |
| 416 | static void frameLimitDropdown(const Window& self, int16_t itemIndex) |
| 417 | { |
no test coverage detected