Просмотр исходного кода

Merge pull request #49 from archshift/redundantloop

Removed redundant loop in EmuThread::run()
bunnei 12 лет назад
Родитель
Сommit
3cd5ede355
1 измененных файлов с 7 добавлено и 10 удалено
  1. 7 10
      src/citra_qt/bootmanager.cpp

+ 7 - 10
src/citra_qt/bootmanager.cpp

@@ -32,17 +32,14 @@ void EmuThread::run()
 {
     while (true)
     {
-        for (int tight_loop = 0; tight_loop < 10000; ++tight_loop)
+        if (cpu_running || exec_cpu_step)
         {
-            if (cpu_running || exec_cpu_step)
-            {
-                if (exec_cpu_step)
-                    exec_cpu_step = false;
-
-                Core::SingleStep();
-                if (!cpu_running)
-                    emit CPUStepped();
-            }
+            if (exec_cpu_step)
+                exec_cpu_step = false;
+
+            Core::SingleStep();
+            if (!cpu_running)
+                emit CPUStepped();
         }
     }