]> git.sesse.net Git - nageru/commitdiff
Fix an issue where we would show no signal even when there was a signal. Patch by...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 16 Jul 2019 11:40:02 +0000 (13:40 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 16 Jul 2019 11:49:55 +0000 (13:49 +0200)
nageru/theme.cpp

index dc73c2ca2553f48c48601b8fd9e8f1fe1deba931..a1195912b5af2a7d665d6923a55670be2b41f79c 100644 (file)
@@ -745,10 +745,10 @@ int InputStateInfo_get_human_readable_resolution(lua_State* L)
        string str;
        if (!input_state_info->last_is_connected[signal_num]) {
                str = "disconnected";
-       } else if (input_state_info->last_height[signal_num]) {
+       } else if (input_state_info->last_height[signal_num] <= 0) {
                str = "no signal";
        } else if (!input_state_info->last_has_signal[signal_num]) {
-               if (input_state_info->last_height[signal_num]) {
+               if (input_state_info->last_height[signal_num] == 525) {
                        // Special mode for the USB3 cards.
                        str = "no signal";
                } else {