Commit graph

13 commits

Author SHA1 Message Date
Thomas Martitz
3a86352a5d sim/sdlapp: Do not quit immediately on panicf, but wait for quit.
Change-Id: I2f0b4b560f00a43ad4b240911e4c30a162deb6e3
2014-02-02 16:59:29 +01:00
Frank Gevaerts
3d0c787a48 Change display_zoom from int to double.
The main reason for this is to be able to downscale the sdl app, which
when used for designing themes for android tends not to fit on laptop
screens these days.

Change-Id: Ib52731dbebcdd03a572be7754c157471165eb2df
2012-06-19 21:27:53 +02:00
Thomas Martitz
ec36357e8f Fix sdl build warnings
Change-Id: I3e85c63ce246b93572f856b364c9e2ff1b53e52f
2012-01-22 19:38:56 +01:00
Thomas Martitz
991ae1e395 Create fimrware/asm directory for assembly optimized stuff.
This dir is suitable for stuff that doesn't fit the target tree, e.g. because
it also builds on hosted or otherwise. It also has a generic subfolder for
fallback C implementations so that not all archs need to provide asm files.

SOURCES should only contain "foo.c" where foo.c includes the specific
<arch>/foo.c files from the subdirs using the preprocessor. This way automatic
selection of asm versions or generic C verion is possible.

For the start, the thread support files are moved, since ASM threads can
be used on hosted platforms as well. Since core_sleep() remains platform
specific it's moved to the corresponding system.h headers.

Change-Id: Iebff272f3407a6eaafeb7656ceb0ae9eca3f7cb9
2012-01-22 18:46:44 +01:00
Michael Sevakis
6a67707b5e Commit to certain names for cache coherency APIs and discard the aliases.
Wouldn't surprise me a bit to get some non-green.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 07:27:24 +00:00
Thomas Martitz
d8f6c75ab9 Hopefully get shutdown/exit handling on SDL/maemo right.
Make shutdown_hw() not return as it's supposed to, ensure sim_do_exit() is called from main thread and move sim_kernel_shutdown() into it to simplify things.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29455 a1c6a512-1295-4272-9138-f99709370657
2011-02-28 03:24:48 +00:00
Thomas Martitz
6d85de3419 Implement cooperative threads on hosted platforms using C code.
This replaces SDL threads with real cooperative threads, which are less cpu intensive and allow priority scheduling.
The backend for context switching is dependant on the host (sigaltstack/longjmp on Unix, Fibers on Windows).
configure has options to force or disallow SDL threads.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29327 a1c6a512-1295-4272-9138-f99709370657
2011-02-18 22:46:01 +00:00
Rafaël Carré
1edfe3fd47 SDL enhancements:
- remove infinite loop after exit()
- make sure picture_surface is initialized, and free it
- split gui_message_loop() in 3 functions and change prototype
- some code is only used in simulator

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27366 a1c6a512-1295-4272-9138-f99709370657
2010-07-10 02:46:08 +00:00
Michael Sevakis
6ce5279ff3 Simulator: get rid of SDL_mutex* parameter to sim_do_exit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26338 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 21:36:04 +00:00
Michael Sevakis
deb1600bbc SDL Simulator: Get thread shutdown and properly handled and fix a minor memory leak that happens when threads exit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26336 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 18:46:09 +00:00
Thomas Martitz
6cbc701d2a Rename sdl lcd initialization to (remote_)lcd_init_device which enables removing two #ifdef SIMULATOR and makes it happen as on target.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26137 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 12:27:20 +00:00
Thomas Martitz
c4c7069a8a Fix FS#11280
SDL docs say SDL_PumpEvent (implicitely called by SDL_Poll/WaitEvent)
may only be called from the thread that initializes the video subsystem,
apparently because Windows requires that.
So create an (or bring it back) SDL thread (with preemtive behavior) to read the
event queue for buttons and initialize the video subsystem.
I'd probably would have done that anyway because it enables an interrupt-like method to read them (no polling).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26113 a1c6a512-1295-4272-9138-f99709370657
2010-05-17 17:19:31 +00:00
Thomas Martitz
3d0cee8abb - Move uisimulator/sdl/*.[ch] into the target tree, under firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c.
- Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization).

This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 21:02:47 +00:00
Renamed from uisimulator/sdl/system-sdl.h (Browse further)