mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-04 00:49:02 -06:00 
			
		
		
		
	android: frontend: Cleanup framerate counter.
This commit is contained in:
		@@ -195,11 +195,10 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
 | 
			
		||||
            {
 | 
			
		||||
                final double[] perfStats = NativeLibrary.GetPerfStats();
 | 
			
		||||
                if (perfStats[FPS] > 0) {
 | 
			
		||||
                    mPerfStats.setText(String.format("FPS: %d Speed: %d%%", (int) (perfStats[FPS]),
 | 
			
		||||
                            (int) (perfStats[SPEED] * 100.0)));
 | 
			
		||||
                    mPerfStats.setText(String.format("FPS: %.1f", perfStats[FPS]));
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                perfStatsUpdateHandler.postDelayed(perfStatsUpdater, 3000);
 | 
			
		||||
                perfStatsUpdateHandler.postDelayed(perfStatsUpdater, 100);
 | 
			
		||||
            };
 | 
			
		||||
            perfStatsUpdateHandler.post(perfStatsUpdater);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -198,7 +198,7 @@ public:
 | 
			
		||||
        while (true) {
 | 
			
		||||
            {
 | 
			
		||||
                std::unique_lock lock(m_mutex);
 | 
			
		||||
                if (m_cv.wait_for(lock, std::chrono::milliseconds(100),
 | 
			
		||||
                if (m_cv.wait_for(lock, std::chrono::milliseconds(800),
 | 
			
		||||
                                  [&]() { return !m_is_running; })) {
 | 
			
		||||
                    // Emulation halted.
 | 
			
		||||
                    break;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user