forked from len0rd/rockbox
SDL: Migrate to SDL2
Incorporates large portions of g#5879 g#5282 g#5285 g#5286 g#5287 Differences from the above patches: * Removed all MacOS-specific stuff * Removed support for SDL1 entirely * Properly implement mousewheel support * Bumped up minimum stack size for sigalstack threading * Check for overflow before enqueing scrollwheel events Tested on: * sdl application (Linux) * Simulator (x86_64, Linux) -- xduoox3/ipod4g/sansafuze * Simulator (i686, Windows) -- xduoox3 * Simulator (arm64, Linux) Change-Id: Ia3012dd1be123feb2888798a42d5b7cc149f382b
This commit is contained in:
parent
d13029ebdd
commit
7927423e34
49 changed files with 709 additions and 717 deletions
|
@ -153,7 +153,7 @@ void sim_kernel_shutdown(void)
|
|||
SDL_Delay(10);
|
||||
|
||||
SDL_DestroyMutex(sim_irq_mtx);
|
||||
SDL_DestroyCond(sim_thread_cond);
|
||||
SDL_DestroyCond(sim_thread_cond);
|
||||
}
|
||||
|
||||
Uint32 tick_timer(Uint32 interval, void *param)
|
||||
|
@ -162,9 +162,9 @@ Uint32 tick_timer(Uint32 interval, void *param)
|
|||
|
||||
(void) interval;
|
||||
(void) param;
|
||||
|
||||
|
||||
new_tick = (SDL_GetTicks() - start_tick) / (1000/HZ);
|
||||
|
||||
|
||||
while(new_tick != current_tick)
|
||||
{
|
||||
sim_enter_irq_handler();
|
||||
|
@ -175,7 +175,7 @@ Uint32 tick_timer(Uint32 interval, void *param)
|
|||
|
||||
sim_exit_irq_handler();
|
||||
}
|
||||
|
||||
|
||||
return interval;
|
||||
}
|
||||
|
||||
|
@ -187,10 +187,10 @@ void tick_start(unsigned int interval_in_ms)
|
|||
exit(-1);
|
||||
}
|
||||
|
||||
if (tick_timer_id != NULL)
|
||||
if (tick_timer_id != 0)
|
||||
{
|
||||
SDL_RemoveTimer(tick_timer_id);
|
||||
tick_timer_id = NULL;
|
||||
tick_timer_id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue