FS#1136 - UI simulator updates for Win32

Attached to Project: Rockbox
Opened by Magnus Holmgren (learman) - Sunday, 23 March 2003, 18:25 GMT
Last edited by Jörg Hohensohn (hohensoh) - Wednesday, 21 May 2003, 09:38 GMT
Task Type Patches
Status Closed
Assigned To Jörg Hohensohn (hohensoh)
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


These patches contains several updates to the Win32
version of the UI simulator. It now works quite well
for me, when building with Cygwin.

First out is lcd-sim.diff, which adds the bare
neccessary for it to compile and work - sort of. It
adds the required functionality to lcd-win32.c.
However, at least the player version doesn't work too
well then, as the "zoom" of the LCD display is quite
different then. See the uisw32.diff below for details.
Also, the button handling isn't impressive... :)

Second patch is button.diff, which revamps the keyboard
handling. It is largely based on the "real" button.c,
with two major changes: 1) reboot handling is removed
and 2) rather than reading the hardware, the button
input queue is fed through events from the Windows
message pump.

I've tested it briefly on player and recorder
simulators and seems to work quite well. At least I can
enter menus now. :)

Third patch is uisw32.diff, which removes the UI256.bmp
from the main window, leaving only the actual LCD
display. The new player simulation code requires some
changes to make it work decently, so I chose this
solution, as it makes the Win32 simulator more like the
X11 one, AFAIK.

The location of the volume icon is tweaked a little, so
as to be fully visible. I guess there are more things
to tweak (e.g., so the window title shows e.g. 120%
zoom rather than 119%), but now it works rather good.

I split up the patches into separate files manually, so
I might have made an error somewhere. Hopefully you'll
be able to pick your poision this way. :)

This task depends upon

Closed by  Jörg Hohensohn (hohensoh)
Wednesday, 21 May 2003, 09:38 GMT
Reason for closing:  Accepted
Comment by Magnus Holmgren (learman) - Sunday, 23 March 2003, 18:27 GMT

(Now why can't I attach a file with the initial patch submit?)
Comment by Jörg Hohensohn (hohensoh) - Saturday, 19 April 2003, 13:20 GMT

Checked in, except for the bitmap removal.
As Markus suggests, a mutex or critical section would be
appropriate to protect the button queue from different thread
ends. Not done by now, maybe better to generally do this for
Win32 simulated queues on kernel level.