mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Player compatible code, interface still needs some changes for player
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@874 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
61648002b4
commit
647661c3bb
6 changed files with 61 additions and 41 deletions
|
|
@ -18,6 +18,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include <windows.h>
|
||||
#include "uisw32.h"
|
||||
#include "config.h"
|
||||
#include "sh7034.h"
|
||||
#include "button.h"
|
||||
|
|
@ -34,6 +35,8 @@ void button_init(void)
|
|||
int button_get(bool block)
|
||||
{
|
||||
int btn = 0;
|
||||
if (bActive)
|
||||
{
|
||||
if (KEY (VK_NUMPAD4) ||
|
||||
KEY (VK_LEFT)) // left button
|
||||
btn |= BUTTON_LEFT;
|
||||
|
|
@ -50,16 +53,13 @@ int button_get(bool block)
|
|||
KEY (VK_DOWN))
|
||||
btn |= BUTTON_DOWN; // down button
|
||||
|
||||
if (KEY (VK_NUMPAD5) ||
|
||||
KEY (VK_SPACE))
|
||||
btn |= BUTTON_PLAY; // play button
|
||||
|
||||
if (KEY (VK_RETURN))
|
||||
btn |= BUTTON_OFF; // off button
|
||||
|
||||
if (KEY (VK_ADD))
|
||||
btn |= BUTTON_ON; // on button
|
||||
|
||||
#ifdef HAVE_RECORDER_KEYPAD
|
||||
if (KEY (VK_RETURN))
|
||||
btn |= BUTTON_OFF; // off button
|
||||
|
||||
if (KEY (VK_DIVIDE))
|
||||
btn |= BUTTON_F1; // F1 button
|
||||
|
||||
|
|
@ -69,8 +69,17 @@ int button_get(bool block)
|
|||
if (KEY (VK_SUBTRACT))
|
||||
btn |= BUTTON_F3; // F3 button
|
||||
|
||||
if (KEY (VK_NUMPAD5) ||
|
||||
KEY (VK_SPACE))
|
||||
btn |= BUTTON_PLAY; // play button
|
||||
#else
|
||||
if (KEY (VK_RETURN))
|
||||
btn |= BUTTON_MENU; // menu button
|
||||
#endif
|
||||
|
||||
if (btn != 0) {
|
||||
last_key = 0 ;
|
||||
}
|
||||
}
|
||||
return btn;
|
||||
}
|
||||
|
|
@ -27,8 +27,15 @@ APPDIR = ../../apps/
|
|||
RECDIR = $(APPDIR)recorder/
|
||||
RM = del
|
||||
|
||||
#DISPLAY = -DHAVE_LCD_CHARCELLS
|
||||
DISPLAY = -DHAVE_LCD_BITMAP
|
||||
|
||||
#KEYPAD = -DHAVE_PLAYER_KEYPAD
|
||||
KEYPAD = -DHAVE_RECORDER_KEYPAD
|
||||
|
||||
CC = cl
|
||||
DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR -DARCHOS_RECORDER -D_WIN32 -DWIN32
|
||||
DEFINES = -DWIN32 -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
|
||||
$(KEYPAD) $(DISPLAY)
|
||||
LDFLAGS = /ouisw32.exe /link -subsystem:windows
|
||||
INCLUDES = -I$(FIRMWAREDIR) -I$(DRIVERS) -I$(COMMON) -I$(SIMDIR) -I$(APPDIR) -I$(RECDIR)
|
||||
LIBS = gdi32.lib user32.lib
|
||||
|
|
@ -36,12 +43,14 @@ LIBS = gdi32.lib user32.lib
|
|||
|
||||
CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb"
|
||||
|
||||
#SRCS = $(wildcard *.c)
|
||||
|
||||
SRCS = lcd-win32.c tetris.c uisw32.c lcd.c button.c tree.c main.c \
|
||||
SRCS = lcd-win32.c uisw32.c lcd.c button.c tree.c main.c \
|
||||
chartables.c kernel.c uisw32.res dir-win32.c main_menu.c \
|
||||
play.c bmp.c debug-win32.c screensaver.c menu.c credits.c \
|
||||
icons.c sound_menu.c mpeg.c id3.c settings.c sprintf.c
|
||||
play.c debug-win32.c menu.c credits.c sound_menu.c mpeg.c \
|
||||
id3.c settings.c sprintf.c
|
||||
|
||||
!IF ("$(DISPLAY)" == "-DHAVE_LCD_BITMAP")
|
||||
SRCS = $(SRCS) tetris.c screensaver.c icons.c bmp.c
|
||||
!ENDIF
|
||||
|
||||
OBJS = $(SRCS:.c=.obj)
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ extern void new_key(int key);
|
|||
HWND hGUIWnd; // the GUI window handle
|
||||
unsigned int uThreadID; // id of mod thread
|
||||
PBYTE lpKeys;
|
||||
bool bActive; // window active?
|
||||
|
||||
// GUIWndProc
|
||||
// window proc for GUI simulator
|
||||
|
|
@ -47,6 +48,12 @@ LRESULT GUIWndProc (
|
|||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_ACTIVATE:
|
||||
if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE)
|
||||
bActive = true;
|
||||
else
|
||||
bActive = false;
|
||||
return TRUE;
|
||||
case WM_CREATE:
|
||||
// load background image
|
||||
hBkgnd = (HBITMAP)LoadImage (GetModuleHandle (NULL), MAKEINTRESOURCE(IDB_UI),
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
extern HWND hGUIWnd; // the GUI window handle
|
||||
extern unsigned int uThreadID; // id of mod thread
|
||||
extern bool bActive;
|
||||
|
||||
// typedefs
|
||||
typedef unsigned char uchar;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -20,7 +20,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""C:\Programming\CVS Checkout\RockBox\apps\recorder";"C:\Programming\CVS Checkout\RockBox\apps";"C:\Programming\CVS Checkout\RockBox\firmware";"C:\Programming\CVS Checkout\RockBox\uisimulator\win32";"C:\Programming\CVS Checkout\RockBox\firmware\drivers";"C:\Programming\CVS Checkout\RockBox\firmware\common""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;ARCHOS_RECORDER;SIMULATOR;HAVE_LCD_BITMAP;SIMULATOR;"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_PLAYER_KEYPAD;HAVE_LCD_CHARCELLS;SIMULATOR;SIMULATOR;"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
|
|
@ -184,9 +184,6 @@
|
|||
<File
|
||||
RelativePath="..\..\firmware\playlist.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\apps\recorder\screensaver.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\firmware\settings.c">
|
||||
</File>
|
||||
|
|
@ -196,9 +193,6 @@
|
|||
<File
|
||||
RelativePath="..\..\firmware\common\sprintf.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\apps\recorder\tetris.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\apps\tree.c">
|
||||
</File>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue