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 <windows.h>
|
||||||
|
#include "uisw32.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "sh7034.h"
|
#include "sh7034.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
|
|
@ -34,43 +35,51 @@ void button_init(void)
|
||||||
int button_get(bool block)
|
int button_get(bool block)
|
||||||
{
|
{
|
||||||
int btn = 0;
|
int btn = 0;
|
||||||
if (KEY (VK_NUMPAD4) ||
|
if (bActive)
|
||||||
KEY (VK_LEFT)) // left button
|
{
|
||||||
btn |= BUTTON_LEFT;
|
if (KEY (VK_NUMPAD4) ||
|
||||||
|
KEY (VK_LEFT)) // left button
|
||||||
|
btn |= BUTTON_LEFT;
|
||||||
|
|
||||||
if (KEY (VK_NUMPAD6) ||
|
if (KEY (VK_NUMPAD6) ||
|
||||||
KEY (VK_RIGHT))
|
KEY (VK_RIGHT))
|
||||||
btn |= BUTTON_RIGHT; // right button
|
btn |= BUTTON_RIGHT; // right button
|
||||||
|
|
||||||
if (KEY (VK_NUMPAD8) ||
|
if (KEY (VK_NUMPAD8) ||
|
||||||
KEY (VK_UP))
|
KEY (VK_UP))
|
||||||
btn |= BUTTON_UP; // up button
|
btn |= BUTTON_UP; // up button
|
||||||
|
|
||||||
if (KEY (VK_NUMPAD2) ||
|
if (KEY (VK_NUMPAD2) ||
|
||||||
KEY (VK_DOWN))
|
KEY (VK_DOWN))
|
||||||
btn |= BUTTON_DOWN; // down button
|
btn |= BUTTON_DOWN; // down button
|
||||||
|
|
||||||
if (KEY (VK_NUMPAD5) ||
|
if (KEY (VK_ADD))
|
||||||
KEY (VK_SPACE))
|
btn |= BUTTON_ON; // on button
|
||||||
btn |= BUTTON_PLAY; // play button
|
|
||||||
|
|
||||||
if (KEY (VK_RETURN))
|
#ifdef HAVE_RECORDER_KEYPAD
|
||||||
btn |= BUTTON_OFF; // off button
|
if (KEY (VK_RETURN))
|
||||||
|
btn |= BUTTON_OFF; // off button
|
||||||
|
|
||||||
if (KEY (VK_ADD))
|
if (KEY (VK_DIVIDE))
|
||||||
btn |= BUTTON_ON; // on button
|
btn |= BUTTON_F1; // F1 button
|
||||||
|
|
||||||
if (KEY (VK_DIVIDE))
|
if (KEY (VK_MULTIPLY))
|
||||||
btn |= BUTTON_F1; // F1 button
|
btn |= BUTTON_F2; // F2 button
|
||||||
|
|
||||||
if (KEY (VK_MULTIPLY))
|
if (KEY (VK_SUBTRACT))
|
||||||
btn |= BUTTON_F2; // F2 button
|
btn |= BUTTON_F3; // F3 button
|
||||||
|
|
||||||
if (KEY (VK_SUBTRACT))
|
if (KEY (VK_NUMPAD5) ||
|
||||||
btn |= BUTTON_F3; // F3 button
|
KEY (VK_SPACE))
|
||||||
|
btn |= BUTTON_PLAY; // play button
|
||||||
|
#else
|
||||||
|
if (KEY (VK_RETURN))
|
||||||
|
btn |= BUTTON_MENU; // menu button
|
||||||
|
#endif
|
||||||
|
|
||||||
if (btn != 0) {
|
if (btn != 0) {
|
||||||
last_key = 0 ;
|
last_key = 0 ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return btn;
|
return btn;
|
||||||
}
|
}
|
||||||
|
|
@ -27,8 +27,15 @@ APPDIR = ../../apps/
|
||||||
RECDIR = $(APPDIR)recorder/
|
RECDIR = $(APPDIR)recorder/
|
||||||
RM = del
|
RM = del
|
||||||
|
|
||||||
|
#DISPLAY = -DHAVE_LCD_CHARCELLS
|
||||||
|
DISPLAY = -DHAVE_LCD_BITMAP
|
||||||
|
|
||||||
|
#KEYPAD = -DHAVE_PLAYER_KEYPAD
|
||||||
|
KEYPAD = -DHAVE_RECORDER_KEYPAD
|
||||||
|
|
||||||
CC = cl
|
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
|
LDFLAGS = /ouisw32.exe /link -subsystem:windows
|
||||||
INCLUDES = -I$(FIRMWAREDIR) -I$(DRIVERS) -I$(COMMON) -I$(SIMDIR) -I$(APPDIR) -I$(RECDIR)
|
INCLUDES = -I$(FIRMWAREDIR) -I$(DRIVERS) -I$(COMMON) -I$(SIMDIR) -I$(APPDIR) -I$(RECDIR)
|
||||||
LIBS = gdi32.lib user32.lib
|
LIBS = gdi32.lib user32.lib
|
||||||
|
|
@ -36,12 +43,14 @@ LIBS = gdi32.lib user32.lib
|
||||||
|
|
||||||
CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb"
|
CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb"
|
||||||
|
|
||||||
#SRCS = $(wildcard *.c)
|
SRCS = lcd-win32.c uisw32.c lcd.c button.c tree.c main.c \
|
||||||
|
|
||||||
SRCS = lcd-win32.c tetris.c uisw32.c lcd.c button.c tree.c main.c \
|
|
||||||
chartables.c kernel.c uisw32.res dir-win32.c main_menu.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 \
|
play.c debug-win32.c menu.c credits.c sound_menu.c mpeg.c \
|
||||||
icons.c sound_menu.c mpeg.c id3.c settings.c sprintf.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)
|
OBJS = $(SRCS:.c=.obj)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ extern void new_key(int key);
|
||||||
HWND hGUIWnd; // the GUI window handle
|
HWND hGUIWnd; // the GUI window handle
|
||||||
unsigned int uThreadID; // id of mod thread
|
unsigned int uThreadID; // id of mod thread
|
||||||
PBYTE lpKeys;
|
PBYTE lpKeys;
|
||||||
|
bool bActive; // window active?
|
||||||
|
|
||||||
// GUIWndProc
|
// GUIWndProc
|
||||||
// window proc for GUI simulator
|
// window proc for GUI simulator
|
||||||
|
|
@ -47,6 +48,12 @@ LRESULT GUIWndProc (
|
||||||
|
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
|
case WM_ACTIVATE:
|
||||||
|
if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE)
|
||||||
|
bActive = true;
|
||||||
|
else
|
||||||
|
bActive = false;
|
||||||
|
return TRUE;
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
// load background image
|
// load background image
|
||||||
hBkgnd = (HBITMAP)LoadImage (GetModuleHandle (NULL), MAKEINTRESOURCE(IDB_UI),
|
hBkgnd = (HBITMAP)LoadImage (GetModuleHandle (NULL), MAKEINTRESOURCE(IDB_UI),
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
extern HWND hGUIWnd; // the GUI window handle
|
extern HWND hGUIWnd; // the GUI window handle
|
||||||
extern unsigned int uThreadID; // id of mod thread
|
extern unsigned int uThreadID; // id of mod thread
|
||||||
|
extern bool bActive;
|
||||||
|
|
||||||
// typedefs
|
// typedefs
|
||||||
typedef unsigned char uchar;
|
typedef unsigned char uchar;
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -20,7 +20,7 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
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""
|
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"
|
MinimalRebuild="TRUE"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
|
|
@ -184,9 +184,6 @@
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\firmware\playlist.c">
|
RelativePath="..\..\firmware\playlist.c">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\apps\recorder\screensaver.c">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\firmware\settings.c">
|
RelativePath="..\..\firmware\settings.c">
|
||||||
</File>
|
</File>
|
||||||
|
|
@ -196,9 +193,6 @@
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\firmware\common\sprintf.c">
|
RelativePath="..\..\firmware\common\sprintf.c">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\apps\recorder\tetris.c">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\apps\tree.c">
|
RelativePath="..\..\apps\tree.c">
|
||||||
</File>
|
</File>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue