浏览代码

power: whoops, that should be "==" not "!=".

Ryan C. Gordon 8 年之前
父节点
当前提交
b36755a3fc
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/power/linux/SDL_syspower.c

+ 1 - 1
src/power/linux/SDL_syspower.c

@@ -465,7 +465,7 @@ SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *state, int *second
            the system. Most system batteries don't list a scope at all; we
            the system. Most system batteries don't list a scope at all; we
            assume it's a system battery if not specified. */
            assume it's a system battery if not specified. */
         if (read_power_file(base, name, "scope", str, sizeof (str))) {
         if (read_power_file(base, name, "scope", str, sizeof (str))) {
-            if (SDL_strcmp(str, "device\n") != 0) {
+            if (SDL_strcmp(str, "device\n") == 0) {
                 continue;  /* skip external devices with their own batteries. */
                 continue;  /* skip external devices with their own batteries. */
             }
             }
         }
         }