「わかりました」>「あんまりわかってません」の間接的な用法


by ayamem
カレンダー
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

VisualBoyAdvance 1.7.2 CPUリソース喰いまくり回避 メモ

VisualBoyAdvance 1.7.2 CPUリソース喰いまくり回避。



~/src/sdl/SDL.cpp
-----------------------------------------
2828a2828,2848
> if(!wasPaused ) {
> if(!speedup) {
> u32 time = systemGetClock();
> u32 diff = time - throttleLastTime;
> int target;
>
> if (throttle) {
> target = (100000/(60*throttle));
> } else {
> target = (100000/6000);
> }
>
> int d = (target - diff);
>
> if(d > 0) {
> SDL_Delay(d);
> }
> }
> throttleLastTime = systemGetClock();
> }
>
2862,2874c2882
< if(!wasPaused && throttle) {
< if(!speedup) {
< u32 diff = time - throttleLastTime;
<
< int target = (1000000/(rate*throttle));
< int d = (target - diff);
<
< if(d > 0) {
< SDL_Delay(d);
< }
< }
< throttleLastTime = systemGetClock();
< }
---
>
2922a2931
>
2948a2958
> SDL_Delay(1);
2965a2976
> SDL_Delay(1);
3357c3368
< SDL_LockYUVOverlay(overlay);
---
> //SDL_LockYUVOverlay(overlay);
3367c3378
< SDL_UnlockYUVOverlay(overlay);
---
> //SDL_UnlockYUVOverlay(overlay);
-----------------------------------------

SDLバイナリ用でつ。デスクトップスレのsystemFrames()周り修正に
加え、音関連の待ちループにもSDL_Delayを強引に追加。ぶさいくだけど
カナーリ効きまつ。
[PR]
by ayamem | 2004-09-17 12:04