Changeset 6e313dd in buchla-emu
- Timestamp:
- 08/01/2017 11:11:47 PM (7 years ago)
- Branches:
- master
- Children:
- 08471db
- Parents:
- bdd5a63
- Location:
- emu
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
emu/cpu.c
rbdd5a63 r6e313dd 656 656 { 657 657 inf("entering CPU loop"); 658 int32_t count = 0; 658 659 659 660 while (SDL_AtomicGet(&run) != 0) { … … 677 678 } 678 679 680 if ((++count & 0x1ff) == 0) { 681 SDL_Delay(0); 682 } 683 679 684 while (SDL_GetPerformanceCounter() < until) { 680 _mm_pause(); 685 for (int32_t i = 0; i < 100; ++i) { 686 _mm_pause(); 687 } 681 688 } 682 689 } -
emu/sdl.c
rbdd5a63 r6e313dd 23 23 #define ver2(...) _ver(sdl_verbose, 1, __VA_ARGS__) 24 24 #define ver3(...) _ver(sdl_verbose, 2, __VA_ARGS__) 25 26 typedef void (*sdl_func_t)(void); 27 28 static sdl_func_t sdl_funcs[] = { 29 ser_sdl 30 }; 25 31 26 32 void sdl_init(void) … … 61 67 62 68 while (SDL_AtomicGet(&run) != 0) { 63 ser_sdl(); 69 for (int32_t i = 0; i < ARRAY_COUNT(sdl_funcs); ++i) { 70 sdl_funcs[i](); 71 } 64 72 65 73 SDL_Event ev;
Note:
See TracChangeset
for help on using the changeset viewer.