Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PUAE
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
PUAE
Commits
41090d16
Commit
41090d16
authored
May 07, 2011
by
CeRiAl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COMMON: Re-enabled sdl-gui
parent
944af870
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
563 additions
and
247 deletions
+563
-247
.gitignore
.gitignore
+89
-54
configure.in
configure.in
+11
-3
Makefile.am
src/gui-sdl/Makefile.am
+11
-0
joystick.bmp
src/gui-sdl/images/joystick.bmp
+0
-0
vkbd.bmp
src/gui-sdl/images/vkbd.bmp
+0
-0
inputmode.c
src/gui-sdl/inputmode.c
+2
-2
menu.c
src/gui-sdl/menu.c
+237
-74
menu.h
src/gui-sdl/menu.h
+0
-1
menu_load.c
src/gui-sdl/menu_load.c
+77
-54
menu_prefs.c
src/gui-sdl/menu_prefs.c
+49
-30
menu_tweak.c
src/gui-sdl/menu_tweak.c
+34
-17
volumecontrol.c
src/gui-sdl/volumecontrol.c
+0
-1
sysconfig.h.in
src/sysconfig.h.in
+53
-11
No files found.
.gitignore
View file @
41090d16
.gitignore
Makefile.in
# Files to ignore
aclocal.m4
autom4te.cache/
autom4te.cache
.deps
Makefile
Makefile.in
*~
*.o
*.a
configure
src/Makefile.in
src/archivers/dms/Makefile.in
src/archivers/zip/Makefile.in
src/caps/Makefile.in
src/gfx-amigaos/Makefile.in
src/gfx-beos/Makefile.in
src/gfx-cocoa/Makefile.in
src/gfx-curses/Makefile.in
src/gfx-sdl/Makefile.in
src/gfx-x11/Makefile.in
src/gui-beos/Makefile.in
src/gui-cocoa/Makefile.in
src/gui-gtk/Makefile.in
src/gui-muirexx/Makefile.in
src/gui-none/Makefile.in
src/gui-qt/Makefile.in
src/jd-amigainput/Makefile.in
src/jd-amigaos/Makefile.in
src/jd-beos/Makefile.in
src/jd-linuxold/Makefile.in
src/jd-none/Makefile.in
src/jd-sdl/Makefile.in
src/keymap/Makefile.in
src/md-68k/Makefile.in
src/md-amd64-gcc/Makefile.in
src/md-generic/Makefile.in
src/md-i386-gcc/Makefile.in
src/md-ppc-gcc/Makefile.in
src/md-ppc/Makefile.in
src/od-amiga/Makefile.in
src/od-beos/Makefile.in
src/od-generic/Makefile.in
src/od-linux/Makefile.in
src/od-macosx/Makefile.in
src/od-win32/Makefile.in
src/sd-alsa/Makefile.in
src/sd-amigaos/Makefile.in
src/sd-beos/Makefile.in
src/sd-none/Makefile.in
src/sd-sdl/Makefile.in
src/sd-solaris/Makefile.in
src/sd-uss/Makefile.in
src/td-amigaos/Makefile.in
src/td-beos/Makefile.in
src/td-none/Makefile.in
src/td-posix/Makefile.in
src/td-sdl/Makefile.in
src/td-win32/Makefile.in
src/test/Makefile.in
src/tools/autom4te.cache/
src/tools/configure
config.log
config.status
sysconfig.h
stamp-h1
.DS_Store
# Eclipse project files
/.project
/.cproject
/.settings
/.autotools
# mingw32/cygwin and mingw32ce (WinCE) related
*.exe
/cerial_compile.txt
/_testbed_/
/src/uae.rc
/df0.adz
/kick.rom
/drive_sounds.zip
/src/gfxdep
/src/guidep
/src/joydep
/src/machdep
/src/osdep
/src/sounddep
/src/threaddep
/src/PUAE.app
/src/od-macosx/Credits.rtf
/src/od-macosx/Info.plist
# symbolic links (under cygwin they are real files)
/src/md-fpp.h
/src/target.h
/src/tools/blitops.c
/src/tools/build68k.c
/src/tools/cpudefs.c
/src/tools/genblitter.c
/src/tools/gencomp.c
/src/tools/gencpu.c
/src/tools/genlinetoscr.c
/src/tools/missing.c
/src/tools/readcpu.c
/src/tools/writelog.c
/src/tools/build68k
/src/tools/genblitter
/src/tools/gencomp
/src/tools/gencpu
/src/tools/genlinetoscr
# generated files
# blitter
/src/blit.h
/src/blitfunc.c
/src/blitfunc.h
/src/blittable.c
/src/linetoscr.c
# cpu
/src/cpudefs.c
/src/cputbl.h
/src/cpustbl.c
/src/compemu.c
/src/comptbl.h
/src/compstbl.c
/src/cpuemu_0.c
/src/cpuemu_11.c
/src/cpuemu_12.c
/src/cpuemu_20.c
/src/cpuemu_21.c
/src/cpuemu_31.c
# jit
/src/compemu.cpp
/src/compstbl.h
/src/compstbl.cpp
#Ignore default Visual Studio build folders
[Dd]ebug/
[Rr]elease/
configure.in
View file @
41090d16
...
...
@@ -1249,9 +1249,16 @@ dnl
if [[ "$GUI_DEP" = "gui-none" ]]; then
if [[ "x$HAVE_GTK" = "xno" ]]; then
AC_MSG_WARN([UI wanted, but no UI useable target found])
NR_ERRORS=`expr $NR_ERRORS + 1`
WANT_UI=no
if [[ "x$HAVE_SDL" = "xno" ]]; then
AC_MSG_WARN([UI wanted, but no UI useable target found])
NR_ERRORS=`expr $NR_ERRORS + 1`
WANT_UI=no
else
GUI_DEP=gui-sdl
GUI_LIBS="-lSDL_image -lSDL_ttf $SDL_LIBS"
GUI_NAME="SDL"
GUI_CFLAGS="$CFLAGS"
fi
else
GUI_DEP=gui-gtk
GUI_LIBS="$GTK_LIBS"
...
...
@@ -2036,6 +2043,7 @@ AC_CONFIG_FILES([Makefile
src/gui-gtk/Makefile
src/gui-muirexx/Makefile
src/gui-qt/Makefile
src/gui-sdl/Makefile
src/keymap/Makefile
src/test/Makefile
])
...
...
src/gui-sdl/Makefile.am
0 → 100644
View file @
41090d16
AM_CPPFLAGS
=
@UAE_CPPFLAGS@
AM_CPPFLAGS
+=
-I
$(top_srcdir)
/src/include
-I
$(top_builddir)
/src
-I
$(top_srcdir)
/src
AM_CFLAGS
=
@UAE_CFLAGS@
AM_CFLAGS
+=
@SDL_CFLAGS@
noinst_LIBRARIES
=
libguidep.a
libguidep_a_SOURCES
=
inputmode.c menu.c menu_load.c menu_prefs.c menu_tweak.c vkbd.cpp volumecontrol.c
noinst_HEADERS
=
inputmode.h menu.h vkbd.h volumecontrol.h
src/gui-sdl/images/joystick.bmp
0 → 100755
View file @
41090d16
56.3 KB
src/gui-sdl/images/vkbd.bmp
0 → 100755
View file @
41090d16
20.7 KB
src/gui-sdl/inputmode.c
View file @
41090d16
#include <SDL.h>
#include "gp2x.h"
#include "inputmode.h"
extern
char
launchDir
[
256
];
...
...
@@ -44,7 +43,8 @@ void inputmode_redraw(void) {
r
.
h
=
120
;
if
(
inputMode
[
0
]
&&
inputMode
[
1
])
{
if
(
gp2xMouseEmuOn
)
{
// if (gp2xMouseEmuOn) {
if
(
1
)
{
surface
=
inputMode
[
1
];
}
else
{
surface
=
inputMode
[
0
];
...
...
src/gui-sdl/menu.c
View file @
41090d16
#include "SDL.h"
#include "SDL_image.h"
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
...
...
@@ -13,15 +12,28 @@
#include "gui.h"
#include "zfile.h"
#ifdef TOUCHUI
#include <SDL_TouchUI.h>
#endif
#define GUI_DEBUG
#ifdef GUI_DEBUG
#define DEBUG_LOG write_log ( "%s: ", __func__); write_log
#else
#define DEBUG_LOG(...) do ; while(0)
#endif
#define VIDEO_FLAGS SDL_HWSURFACE
SDL_Surface
*
tmpSDLScreen
=
NULL
;
SDL_Surface
*
display
=
NULL
;
int
seciliola
n
=
0
;
int
menuSelectio
n
=
0
;
char
yol
[
256
];
char
msg
[
50
];
char
msg_status
[
50
];
extern
char
launchDir
[
256
];
//extern char launchDir[256];
char
launchDir
[
256
];
extern
int
dirz
(
int
parametre
);
extern
int
tweakz
(
int
parametre
);
...
...
@@ -29,38 +41,79 @@ extern int prefz(int parametre);
int
soundVolume
=
100
;
extern
int
flashLED
;
//
static
int
gui_available
=
0
;
void
write_text
(
int
x
,
int
y
,
char
*
txt
)
{
SDL_Surface
*
pText_Surface
=
TTF_RenderText_Solid
(
amiga_font
,
txt
,
text_color
);
rect
.
x
=
x
;
rect
.
y
=
y
;
rect
.
w
=
pText_Surface
->
w
;
rect
.
h
=
pText_Surface
->
h
;
SDL_BlitSurface
(
pText_Surface
,
NULL
,
tmpSDLScreen
,
&
rect
);
SDL_FreeSurface
(
pText_Surface
);
}
void
blit_image
(
SDL_Surface
*
img
,
int
x
,
int
y
)
{
SDL_Rect
dest
;
dest
.
x
=
x
;
dest
.
y
=
y
;
SDL_BlitSurface
(
img
,
0
,
tmpSDLScreen
,
&
dest
);
}
void
secilimi
(
int
ix
,
int
iy
,
int
mx
,
int
my
,
SDL_Surface
*
img
,
int
hangi
)
{
int
secili
=
0
;
if
(
mx
>=
ix
&&
mx
<=
ix
+
iconsizex
)
{
if
(
my
>=
iy
&&
my
<=
iy
+
iconsizey
)
{
secili
=
1
;
}
}
if
(
secili
==
1
)
{
SDL_SetAlpha
(
img
,
SDL_SRCALPHA
,
100
);
menuSelection
=
hangi
;
}
else
{
SDL_SetAlpha
(
img
,
SDL_SRCALPHA
,
255
);
}
}
int
gui_init
(
void
)
{
if
(
display
==
NULL
)
{
SDL_Init
(
SDL_INIT_VIDEO
|
SDL_INIT_JOYSTICK
);
display
=
SDL_SetVideoMode
(
320
,
240
,
16
,
VIDEO_FLAGS
);
display
=
SDL_GetVideoSurface
();
}
if
(
display
)
{
SDL_JoystickEventState
(
SDL_ENABLE
);
SDL_JoystickOpen
(
0
);
SDL_ShowCursor
(
SDL_DISABLE
);
TTF_Init
();
amiga_font
=
TTF_OpenFont
(
"fonts/amiga4ever_pro2.ttf"
,
8
);
text_color
.
r
=
0
;
text_color
.
g
=
0
;
text_color
.
b
=
0
;
pMenu_Surface
=
SDL_LoadBMP
(
"images/menu.bmp"
);
pMouse_Pointer
=
SDL_LoadBMP
(
"images/mousep.bmp"
);
SDL_SetColorKey
(
pMouse_Pointer
,
SDL_SRCCOLORKEY
,
SDL_MapRGB
(
pMouse_Pointer
->
format
,
85
,
170
,
153
));
icon_expansion
=
SDL_LoadBMP
(
"images/icon-expansion.bmp"
);
icon_preferences
=
SDL_LoadBMP
(
"images/icon-preferences.bmp"
);
icon_keymaps
=
SDL_LoadBMP
(
"images/icon-keymaps.bmp"
);
icon_floppy
=
SDL_LoadBMP
(
"images/icon-floppy.bmp"
);
icon_reset
=
SDL_LoadBMP
(
"images/icon-reset.bmp"
);
icon_storage
=
SDL_LoadBMP
(
"images/icon-storage.bmp"
);
icon_run
=
SDL_LoadBMP
(
"images/icon-run.bmp"
);
icon_exit
=
SDL_LoadBMP
(
"images/icon-exit.bmp"
);
icon_tweaks
=
SDL_LoadBMP
(
"images/icon-tweaks.bmp"
);
tmpSDLScreen
=
SDL_CreateRGBSurface
(
display
->
flags
,
display
->
w
,
display
->
h
,
display
->
format
->
BitsPerPixel
,
display
->
format
->
Rmask
,
display
->
format
->
Gmask
,
display
->
format
->
Bmask
,
display
->
format
->
Amask
);
#ifdef TOUCHUI
SDL_TUI_Init
(
"sdl_touchui.xml"
,
"keyboard-off"
);
#endif
return
1
;
}
SDL_JoystickEventState
(
SDL_ENABLE
);
SDL_JoystickOpen
(
0
);
SDL_ShowCursor
(
SDL_DISABLE
);
TTF_Init
();
amiga_font
=
TTF_OpenFont
(
"fonts/amiga4ever_pro2.ttf"
,
8
);
text_color
.
r
=
0
;
text_color
.
g
=
0
;
text_color
.
b
=
0
;
pMenu_Surface
=
SDL_LoadBMP
(
"images/menu.bmp"
);
pMouse_Pointer
=
SDL_LoadBMP
(
"images/mousep.bmp"
);
SDL_SetColorKey
(
pMouse_Pointer
,
SDL_SRCCOLORKEY
,
SDL_MapRGB
(
pMouse_Pointer
->
format
,
85
,
170
,
153
));
icon_expansion
=
SDL_LoadBMP
(
"images/icon-expansion.bmp"
);
icon_preferences
=
SDL_LoadBMP
(
"images/icon-preferences.bmp"
);
icon_keymaps
=
SDL_LoadBMP
(
"images/icon-keymaps.bmp"
);
icon_floppy
=
SDL_LoadBMP
(
"images/icon-floppy.bmp"
);
icon_reset
=
SDL_LoadBMP
(
"images/icon-reset.bmp"
);
icon_storage
=
SDL_LoadBMP
(
"images/icon-storage.bmp"
);
icon_run
=
SDL_LoadBMP
(
"images/icon-run.bmp"
);
icon_exit
=
SDL_LoadBMP
(
"images/icon-exit.bmp"
);
icon_tweaks
=
SDL_LoadBMP
(
"images/icon-tweaks.bmp"
);
tmpSDLScreen
=
SDL_CreateRGBSurface
(
display
->
flags
,
display
->
w
,
display
->
h
,
display
->
format
->
BitsPerPixel
,
display
->
format
->
Rmask
,
display
->
format
->
Gmask
,
display
->
format
->
Bmask
,
display
->
format
->
Amask
);
return
1
;
return
0
;
}
void
gui_exit
(
void
){
...
...
@@ -83,7 +136,7 @@ void gui_exit (void){
SDL_Quit
;
}
int
gui_display
(
int
shortcut
){
void
gui_display
(
int
shortcut
){
SDL_Event
event
;
int
menu_exitcode
=
-
1
;
...
...
@@ -98,16 +151,24 @@ int gui_display(int shortcut){
int
iconpos_x
=
0
;
int
iconpos_y
=
0
;
if
(
display
==
NULL
)
{
gui_init
();
}
getcwd
(
launchDir
,
256
);
while
(
!
mainloopdone
)
{
while
(
SDL_PollEvent
(
&
event
))
{
#ifdef TOUCHUI
SDL_TUI_HandleEvent
(
&
event
);
#endif
if
(
event
.
type
==
SDL_QUIT
)
{
mainloopdone
=
1
;
}
if
(
event
.
type
==
SDL_JOYBUTTONDOWN
)
{
switch
(
event
.
jbutton
.
button
)
{
case
GP2X_BUTTON_R
:
break
;
#if 0
case GP2X_BUTTON_R: break;
case GP2X_BUTTON_L: break;
case GP2X_BUTTON_UP: kup = 1; break;
case GP2X_BUTTON_DOWN: kdown = 1; break;
...
...
@@ -117,6 +178,7 @@ int gui_display(int shortcut){
case GP2X_BUTTON_B: ksel = 1; break;
case GP2X_BUTTON_Y: break;
case GP2X_BUTTON_START: mainloopdone = 1; break;
#endif
}
}
if
(
event
.
type
==
SDL_KEYDOWN
)
{
...
...
@@ -135,7 +197,7 @@ int gui_display(int shortcut){
mouse_y
+=
event
.
motion
.
yrel
;
}
if
(
event
.
type
==
SDL_MOUSEBUTTONDOWN
)
{
if
(
seciliola
n
==
0
)
{
if
(
menuSelectio
n
==
0
)
{
if
(
mouse_x
>=
0
&&
mouse_x
<=
20
)
{
if
(
mouse_y
>=
0
&&
mouse_y
<=
20
)
{
mainloopdone
=
1
;
...
...
@@ -147,43 +209,43 @@ int gui_display(int shortcut){
}
}
if
(
ksel
==
1
)
{
if
(
seciliola
n
==
menu_sel_expansion
)
{
if
(
menuSelectio
n
==
menu_sel_expansion
)
{
sprintf
(
msg
,
"%s"
,
"Select KickStart ROM"
);
sprintf
(
msg_status
,
"%s"
,
" "
);
sprintf
(
yol
,
"%s/roms"
,
launchDir
);
dirz
(
1
);
}
if
(
seciliola
n
==
menu_sel_floppy
)
{
if
(
menuSelectio
n
==
menu_sel_floppy
)
{
sprintf
(
msg
,
"%s"
,
"Select Disk Image"
);
sprintf
(
msg_status
,
"%s"
,
"DF0: B DF1: A"
);
sprintf
(
yol
,
"%s/disks"
,
launchDir
);
dirz
(
0
);
}
if
(
seciliola
n
==
menu_sel_prefs
)
{
if
(
menuSelectio
n
==
menu_sel_prefs
)
{
sprintf
(
msg
,
"%s"
,
" "
);
sprintf
(
msg_status
,
"%s"
,
" "
);
prefz
(
0
);
}
if
(
seciliola
n
==
menu_sel_reset
)
{
if
(
menuSelectio
n
==
menu_sel_reset
)
{
//reset amiga
menu_exitcode
=
2
;
mainloopdone
=
1
;
}
if
(
seciliola
n
==
menu_sel_keymaps
)
{
if
(
menuSelectio
n
==
menu_sel_keymaps
)
{
}
if
(
seciliola
n
==
menu_sel_tweaks
)
{
if
(
menuSelectio
n
==
menu_sel_tweaks
)
{
sprintf
(
msg
,
"%s"
,
"Tweaks"
);
sprintf
(
msg_status
,
"%s"
,
"L/R = -/+ B: Apply"
);
tweakz
(
0
);
}
if
(
seciliola
n
==
menu_sel_storage
)
{
if
(
menuSelectio
n
==
menu_sel_storage
)
{
}
if
(
seciliola
n
==
menu_sel_run
)
{
if
(
menuSelectio
n
==
menu_sel_run
)
{
menu_exitcode
=
1
;
mainloopdone
=
1
;
}
if
(
seciliola
n
==
menu_sel_exit
)
{
if
(
menuSelectio
n
==
menu_sel_exit
)
{
SDL_Quit
();
#ifdef GP2X
...
...
@@ -242,7 +304,11 @@ int gui_display(int shortcut){
secilimi
(
iconpos_x
,
iconpos_y
,
mouse_x
,
mouse_y
,
icon_exit
,
menu_sel_exit
);
blit_image
(
icon_exit
,
iconpos_x
,
iconpos_y
);
// texts
write_text
(
26
,
3
,
"UAE2x 0.1 alpha //GnoStiC"
);
//char tmpMsg[50];
//sprintf(tmpMsg, "P-UAE %d.%d.%d", UAEMAJOR, UAEMINOR, UAESUBREV);
//write_text (26, 3, tmpMsg);
write_text
(
26
,
3
,
"P-UAE 2.3.0"
);
// mouse pointer ------------------------------
if
(
kleft
==
1
)
{
...
...
@@ -274,43 +340,140 @@ int gui_display(int shortcut){
// mouse pointer-end
SDL_BlitSurface
(
tmpSDLScreen
,
NULL
,
display
,
NULL
);
#ifdef TOUCHUI
SDL_TUI_UpdateAll
();
#endif
SDL_Flip
(
display
);
}
//while done
return
menu_exitcode
;
}
void
write_text
(
int
x
,
int
y
,
char
*
txt
)
{
SDL_Surface
*
pText_Surface
=
TTF_RenderText_Solid
(
amiga_font
,
txt
,
text_color
);
void
gui_handle_events
(
void
)
{
if
(
!
gui_available
)
return
;
#if 0
while (comm_pipe_has_data (&from_gui_pipe)) {
int cmd = read_comm_pipe_int_blocking (&from_gui_pipe);
switch (cmd) {
case UAECMD_EJECTDISK: {
int n = read_comm_pipe_int_blocking (&from_gui_pipe);
uae_sem_wait (&gui_sem);
changed_prefs.floppyslots[n].df[0] = '\0';
uae_sem_post (&gui_sem);
if (pause_uae) {
/* When UAE is running it will notify the GUI when a disk has been inserted
* or removed itself. When UAE is paused, however, we need to do this ourselves
* or the change won't be realized in the GUI until UAE is resumed */
// write_comm_pipe_int (&to_gui_pipe, n, 1);
}
break;
}
case UAECMD_INSERTDISK: {
int n = read_comm_pipe_int_blocking (&from_gui_pipe);
uae_sem_wait (&gui_sem);
strncpy (changed_prefs.floppyslots[n].df, new_disk_string[n], 255);
free (new_disk_string[n]);
new_disk_string[n] = 0;
changed_prefs.floppyslots[n].df[255] = '\0';
uae_sem_post (&gui_sem);
if (pause_uae) {
/* When UAE is running it will notify the GUI when a disk has been inserted
* or removed itself. When UAE is paused, however, we need to do this ourselves
* or the change won't be realized in the GUI until UAE is resumed */
// write_comm_pipe_int (&to_gui_pipe, GUICMD_DISKCHANGE, 0);
// write_comm_pipe_int (&to_gui_pipe, n, 1);
}
break;
}
case UAECMD_RESET:
uae_reset (0);
break;
#ifdef DEBUGGER
case UAECMD_DEBUG:
activate_debugger ();
break;
#endif
case UAECMD_QUIT:
uae_quit ();
break;
case UAECMD_PAUSE:
pause_uae = 1;
uae_pause ();
break;
case UAECMD_RESUME:
pause_uae = 0;
uae_resume ();
break;
case UAECMD_SAVE_CONFIG:
uae_sem_wait (&gui_sem);
//uae_save_config ();
uae_sem_post (&gui_sem);
break;
case UAECMD_SELECT_ROM:
uae_sem_wait (&gui_sem);
strncpy (changed_prefs.romfile, gui_romname, 255);
changed_prefs.romfile[255] = '\0';
free (gui_romname);
uae_sem_post (&gui_sem);
break;
case UAECMD_SELECT_KEY:
uae_sem_wait (&gui_sem);
strncpy (changed_prefs.keyfile, gui_keyname, 255);
changed_prefs.keyfile[255] = '\0';
free (gui_keyname);
uae_sem_post (&gui_sem);
break;
case UAECMD_SAVESTATE_LOAD:
uae_sem_wait (&gui_sem);
savestate_initsave (gui_sstate_name, 0, 0);
savestate_state = STATE_DORESTORE;
write_log ("Restoring state from '%s'...\n", gui_sstate_name);
uae_sem_post (&gui_sem);
break;
case UAECMD_SAVESTATE_SAVE:
uae_sem_wait (&gui_sem);
savestate_initsave (gui_sstate_name, 0, 0);
save_state (gui_sstate_name, "puae");
write_log ("Saved state to '%s'...\n", gui_sstate_name);
uae_sem_post (&gui_sem);
break;
/* case UAECMD_START:
uae_start ();
break;
case UAECMD_STOP:
uae_stop ();
break;*/
}
}
#endif
}
rect
.
x
=
x
;
rect
.
y
=
y
;
rect
.
w
=
pText_Surface
->
w
;
rect
.
h
=
pText_Surface
->
h
;
void
gui_message
(
const
char
*
format
,...)
{
char
msg
[
2048
];
va_list
parms
;
SDL_BlitSurface
(
pText_Surface
,
NULL
,
tmpSDLScreen
,
&
rec
t
);
SDL_FreeSurface
(
pText_Surface
);
}
va_start
(
parms
,
forma
t
);
vsprintf
(
msg
,
format
,
parms
);
va_end
(
parms
);
void
blit_image
(
SDL_Surface
*
img
,
int
x
,
int
y
)
{
SDL_Rect
dest
;
dest
.
x
=
x
;
dest
.
y
=
y
;
SDL_BlitSurface
(
img
,
0
,
tmpSDLScreen
,
&
dest
);
write_log
(
msg
);
}
void
secilimi
(
int
ix
,
int
iy
,
int
mx
,
int
my
,
SDL_Surface
*
img
,
int
hangi
)
{
int
secili
=
0
;
if
(
mx
>=
ix
&&
mx
<=
ix
+
iconsizex
)
{
if
(
my
>=
iy
&&
my
<=
iy
+
iconsizey
)
{
secili
=
1
;
}
}
if
(
secili
==
1
)
{
SDL_SetAlpha
(
img
,
SDL_SRCALPHA
,
100
);
seciliolan
=
hangi
;
}
else
{
SDL_SetAlpha
(
img
,
SDL_SRCALPHA
,
255
);
}
void
gui_fps
(
int
fps
,
int
idle
)
{
gui_data
.
fps
=
fps
;
gui_data
.
idle
=
idle
;
}
//
int
gui_update
(
void
)
{
return
0
;
}
void
gui_flicker_led
(
int
led
,
int
unitnum
,
int
status
)
{}
void
gui_led
(
int
led
,
int
on
)
{}
void
gui_filename
(
int
num
,
const
char
*
name
)
{}
void
gui_disk_image_change
(
int
unitnum
,
const
TCHAR
*
name
,
bool
writeprotected
)
{}
void
gui_lock
(
void
)
{}
void
gui_unlock
(
void
)
{}
void
gui_gameport_button_change
(
int
port
,
int
button
,
int
onoff
)
{}
void
gui_gameport_axis_change
(
int
port
,
int
axis
,
int
state
,
int
max
)
{}
src/gui-sdl/menu.h
View file @
41090d16
#include <stdio.h>
#include <SDL.h>
#include "SDL_ttf.h"
#include "gp2x.h"
#define iconsizex 50
#define iconsizey 60
...
...
src/gui-sdl/menu_load.c
View file @
41090d16
...
...
@@ -5,12 +5,15 @@
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include "gp2x.h"
#include <dirent.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#ifdef TOUCHUI
#include <SDL_TouchUI.h>
#endif
extern
void
write_text
(
int
x
,
int
y
,
char
*
txt
);
extern
void
blit_image
(
SDL_Surface
*
img
,
int
x
,
int
y
);
extern
SDL_Surface
*
display
;
...
...
@@ -19,54 +22,51 @@ extern SDL_Surface* pMenu_Surface;
extern
SDL_Color
text_color
;
#define MAX_FILES 1024
extern
char
launchDir
[];
extern
char
yol
[];
extern
char
msg
[];
extern
char
msg_status
[];
int
dirz
(
int
parametre
)
{
char
launchDir
[
256
];
SDL_Event
event
;
int
getdir
=
1
;
pMenu_Surface
=
SDL_LoadBMP
(
"images/menu_load.bmp"
);
pMenu_Surface
=
SDL_LoadBMP
(
"images/menu_load.bmp"
);
int
loadloopdone
=
0
;
int
num_of_files
=
0
;
int
seciliola
n
=
0
;
int
menuSelectio
n
=
0
;
int
q
;
int
bas
=
0
;
int
ka
=
0
;
int
kb
=
0
;
char
**
filez
=
(
char
**
)
malloc
(
MAX_FILES
*
sizeof
(
char
*
));
if
(
display
==
NULL
)
{
gui_init
();
}
int
i
;
int
paging
=
18
;
DIR
*
d
=
opendir
(
yol
);
struct
dirent
*
ep
;
getcwd
(
launchDir
,
256
);
if
(
d
!=
NULL
)
{
for
(
i
=
0
;
i
<
MAX_FILES
;
i
++
)
{
ep
=
readdir
(
d
);
if
(
ep
==
NULL
)
{
break
;
}
else
{
//if ((!strcmp(ep->d_name,".")) || (!strcmp(ep->d_name,"..")) || (!strcmp(ep->d_name,"uae2x.gpe"))) {
struct
stat
sstat
;
char
*
tmp
=
(
char
*
)
calloc
(
1
,
256
);
strcpy
(
tmp
,
launchDir
);
strcat
(
tmp
,
"/"
);
strcat
(
tmp
,
ep
->
d_name
);
//if (!stat(tmp, &sstat)) {
// if (S_ISDIR(sstat.st_mode)) {
// //folder EKLENECEK
// } else {
filez
[
i
]
=
(
char
*
)
malloc
(
64
);
strncpy
(
filez
[
i
],
ep
->
d_name
,
64
);
num_of_files
++
;
// }
//}
free
(
tmp
);
//}
struct
stat
sstat
;
char
*
tmp
=
(
char
*
)
calloc
(
1
,
256
);
strcpy
(
tmp
,
launchDir
);
strcat
(
tmp
,
"/"
);
strcat
(
tmp
,
ep
->
d_name
);
filez
[
i
]
=
(
char
*
)
malloc
(
64
);
strncpy
(
filez
[
i
],
ep
->
d_name
,
64
);
num_of_files
++
;
free
(
tmp
);
}
}
closedir
(
d
);
...
...
@@ -77,68 +77,88 @@ int dirz (int parametre) {
while
(
!
loadloopdone
)
{
while
(
SDL_PollEvent
(
&
event
))
{
#ifdef TOUCHUI
SDL_TUI_HandleEvent
(
&
event
);
#endif
if
(
event
.
type
==
SDL_QUIT
)
{
loadloopdone
=
1
;
}
if
(
event
.
type
==
SDL_JOYBUTTONDOWN
)
{
switch
(
event
.
jbutton
.
button
)
{
case
GP2X_BUTTON_UP
:
seciliolan
-=
1
;
break
;
case
GP2X_BUTTON_DOWN
:
seciliolan
+=
1
;
break
;
#if 0
case GP2X_BUTTON_UP: menuSelection -= 1; break;
case GP2X_BUTTON_DOWN: menuSelection += 1; break;
case GP2X_BUTTON_A: ka = 1; break;
case GP2X_BUTTON_B: kb = 1; break;
case GP2X_BUTTON_SELECT: loadloopdone = 1; break;
#endif
}
}
if
(
event
.
type
==
SDL_KEYDOWN
)
{
switch
(
event
.
key
.
keysym
.
sym
)
{
case
SDLK_ESCAPE
:
loadloopdone
=
1
;
break
;
case
SDLK_UP
:
seciliola
n
-=
1
;
break
;
case
SDLK_DOWN
:
seciliola
n
+=
1
;
break
;
case
SDLK_UP
:
menuSelectio
n
-=
1
;
break
;
case
SDLK_DOWN
:
menuSelectio
n
+=
1
;
break
;
case
SDLK_a
:
ka
=
1
;
break
;
case
SDLK_b
:
kb
=
1
;
break
;
default:
break
;
}
}
}
if
(
ka
==
1
)
{
//df1
if
(
parametre
==
0
)
{
if
(
parametre
==
0
)
{
if
(
ka
==
1
)
{
//df1
// Select Disk Image
char
*
tmp
=
(
char
*
)
calloc
(
1
,
256
);
strcpy
(
tmp
,
launchDir
);
strcat
(
tmp
,
"/roms/"
);
strcat
(
tmp
,
filez
[
seciliolan
]);
strcpy
(
currprefs
.
df
[
1
],
tmp
);
//strcpy(tmp,launchDir);
strcat
(
tmp
,
"disks/"
);
strcat
(
tmp
,
filez
[
menuSelection
]);
//strcpy(changed_prefs.floppyslots[1].df,tmp);
write_log
(
"Old Disk Image: %s
\n
"
,
changed_prefs
.
floppyslots
[
1
].
df
);
strncpy
(
changed_prefs
.
floppyslots
[
1
].
df
,
tmp
,
255
);
write_log
(
"Selected Disk Image: %s
\n
"
,
changed_prefs
.
floppyslots
[
1
].
df
);
free
(
tmp
);
loadloopdone
=
1
;
ka
=
0
;
}
ka
=
0
;
}
if
(
kb
==
1
)
{
//df0;
if
(
parametre
==
0
)
{
if
(
kb
==
1
)
{
//df0;
// Select Disk Image
char
*
tmp
=
(
char
*
)
calloc
(
1
,
256
);
strcpy
(
tmp
,
launchDir
);
strcat
(
tmp
,
"/disks/"
);
strcat
(
tmp
,
filez
[
seciliolan
]);
strcpy
(
currprefs
.
df
[
0
],
tmp
);
//strcpy(tmp,launchDir);
strcat
(
tmp
,
"disks/"
);
strcat
(
tmp
,
filez
[
menuSelection
]);
//strcpy(changed_prefs.floppyslots[0].df,tmp);
write_log
(
"Old Disk Image: %s
\n
"
,
changed_prefs
.
floppyslots
[
0
].
df
);
strncpy
(
changed_prefs
.
floppyslots
[
0
].
df
,
tmp
,
255
);
write_log
(
"Selected Disk Image: %s
\n
"
,
changed_prefs
.
floppyslots
[
0
].
df
);
free
(
tmp
);
loadloopdone
=
1
;
}
else
{
kb
=
0
;
}
}
else
{
if
(
kb
==
1
)
{
// Select KickStart ROM
char
*
tmp
=
(
char
*
)
calloc
(
1
,
256
);
strcpy
(
tmp
,
launchDir
);
strcat
(
tmp
,
"/roms/"
);
strcat
(
tmp
,
filez
[
seciliolan
]);
strcpy
(
currprefs
.
romfile
,
tmp
);
//strcpy(tmp,launchDir);
strcat
(
tmp
,
"roms/"
);
strcat
(
tmp
,
filez
[
menuSelection
]);
//strcpy(changed_prefs.romfile,tmp);
write_log
(
"Old KickStart ROM: %s
\n
"
,
changed_prefs
.
romfile
);
strncpy
(
changed_prefs
.
romfile
,
tmp
,
255
);
write_log
(
"Selected KickStart ROM: %s
\n
"
,
changed_prefs
.
romfile
);
free
(
tmp
);
loadloopdone
=
1
;
}
kb
=
0
;
ka
=
0
;
kb
=
0
;
}
if
(
seciliolan
<
0
)
{
seciliolan
=
0
;
}
if
(
seciliolan
>=
num_of_files
)
{
seciliolan
=
num_of_files
-
1
;
}
if
(
seciliolan
>
(
bas
+
paging
-
1
))
{
bas
+=
1
;
}
if
(
seciliolan
<
bas
)
{
bas
-=
1
;
}
if
(
menuSelection
<
0
)
{
menuSelection
=
0
;
}
if
(
menuSelection
>=
num_of_files
)
{
menuSelection
=
num_of_files
-
1
;
}
if
(
menuSelection
>
(
bas
+
paging
-
1
))
{
bas
+=
1
;
}
if
(
menuSelection
<
bas
)
{
bas
-=
1
;
}
if
((
bas
+
paging
)
>
num_of_files
)
{
bas
=
(
num_of_files
-
paging
);
}
// background
...
...
@@ -147,11 +167,11 @@ int dirz (int parametre) {
// texts
int
sira
=
0
;
for
(
q
=
bas
;
q
<
(
bas
+
paging
);
q
++
)
{
if
(
seciliola
n
==
q
)
{
if
(
menuSelectio
n
==
q
)
{
text_color
.
r
=
255
;
text_color
.
g
=
100
;
text_color
.
b
=
100
;
}
write_text
(
10
,
25
+
(
sira
*
10
),
filez
[
q
]);
//
if
(
seciliola
n
==
q
)
{
if
(
menuSelectio
n
==
q
)
{
text_color
.
r
=
0
;
text_color
.
g
=
0
;
text_color
.
b
=
0
;
}
sira
++
;
...
...
@@ -161,11 +181,14 @@ int dirz (int parametre) {
write_text
(
15
,
228
,
msg_status
);
SDL_BlitSurface
(
tmpSDLScreen
,
NULL
,
display
,
NULL
);
#ifdef TOUCHUI
SDL_TUI_UpdateAll
();
#endif
SDL_Flip
(
display
);
}
//while done
free
(
filez
);
pMenu_Surface
=
SDL_LoadBMP
(
"images/menu.bmp"
);
pMenu_Surface
=
SDL_LoadBMP
(
"images/menu.bmp"
);
return
0
;
}
src/gui-sdl/menu_prefs.c
View file @
41090d16
...
...
@@ -3,9 +3,12 @@
#include "options.h"
#include "SDL.h"
#include "gp2x.h"
#include <stdlib.h>
#ifdef TOUCHUI
#include <SDL_TouchUI.h>
#endif
extern
void
write_text
(
int
x
,
int
y
,
char
*
txt
);
extern
void
blit_image
(
SDL_Surface
*
img
,
int
x
,
int
y
);
extern
SDL_Surface
*
display
;
...
...
@@ -18,13 +21,17 @@ extern char msg_status[50];
int
prefz
(
int
parametre
)
{
SDL_Event
event
;
pMenu_Surface
=
SDL_LoadBMP
(
"images/menu_tweak.bmp"
);
if
(
display
==
NULL
)
{
gui_init
();
}
pMenu_Surface
=
SDL_LoadBMP
(
"images/menu_tweak.bmp"
);
int
prefsloopdone
=
0
;
int
kup
=
0
;
int
kdown
=
0
;
int
kleft
=
0
;
int
kright
=
0
;
int
seciliola
n
=
0
;
int
menuSelectio
n
=
0
;
int
deger
;
int
q
;
int
w
;
...
...
@@ -48,43 +55,51 @@ int prefz (int parametre) {
char
*
p_floppy
[]
=
{
"0"
,
"100"
,
"200"
,
"300"
};
//3
int
defaults
[]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
defaults
[
0
]
=
currprefs
.
cpu_level
;
if
(
currprefs
.
address_space_24
!=
0
)
{
if
(
currprefs
.
cpu_level
==
2
)
{
defaults
[
0
]
=
4
;
}
if
(
currprefs
.
cpu_level
==
3
)
{
defaults
[
0
]
=
5
;
}
// defaults[0] = changed_prefs.cpu_level;
defaults
[
0
]
=
changed_prefs
.
cpu_model
;
if
(
changed_prefs
.
address_space_24
!=
0
)
{
// if (changed_prefs.cpu_level == 2) { defaults[0] = 4; }
// if (changed_prefs.cpu_level == 3) { defaults[0] = 5; }
if
(
changed_prefs
.
cpu_model
==
2
)
{
defaults
[
0
]
=
4
;
}
if
(
changed_prefs
.
cpu_model
==
3
)
{
defaults
[
0
]
=
5
;
}
}
defaults
[
1
]
=
c
urr
prefs
.
m68k_speed
;
defaults
[
2
]
=
c
urr
prefs
.
chipset_mask
;
defaults
[
3
]
=
c
urr
prefs
.
chipmem_size
;
defaults
[
4
]
=
c
urr
prefs
.
fastmem_size
;
defaults
[
5
]
=
c
urr
prefs
.
bogomem_size
;
defaults
[
6
]
=
c
urr
prefs
.
produce_sound
;
defaults
[
7
]
=
c
urr
prefs
.
gfx_framerate
;
defaults
[
8
]
=
c
urr
prefs
.
floppy_speed
;
defaults
[
1
]
=
c
hanged_
prefs
.
m68k_speed
;
defaults
[
2
]
=
c
hanged_
prefs
.
chipset_mask
;
defaults
[
3
]
=
c
hanged_
prefs
.
chipmem_size
;
defaults
[
4
]
=
c
hanged_
prefs
.
fastmem_size
;
defaults
[
5
]
=
c
hanged_
prefs
.
bogomem_size
;
defaults
[
6
]
=
c
hanged_
prefs
.
produce_sound
;
defaults
[
7
]
=
c
hanged_
prefs
.
gfx_framerate
;
defaults
[
8
]
=
c
hanged_
prefs
.
floppy_speed
;
char
*
tmp
;
tmp
=
(
char
*
)
malloc
(
6
);
while
(
!
prefsloopdone
)
{
while
(
SDL_PollEvent
(
&
event
))
{
#ifdef TOUCHUI
SDL_TUI_HandleEvent
(
&
event
);
#endif
if
(
event
.
type
==
SDL_QUIT
)
{
prefsloopdone
=
1
;
}
if
(
event
.
type
==
SDL_JOYBUTTONDOWN
)
{
switch
(
event
.
jbutton
.
button
)
{
case
GP2X_BUTTON_UP
:
seciliolan
--
;
break
;
case
GP2X_BUTTON_DOWN
:
seciliolan
++
;
break
;
#if 0
case GP2X_BUTTON_UP: menuSelection--; break;
case GP2X_BUTTON_DOWN: menuSelection++; break;
case GP2X_BUTTON_LEFT: kleft = 1; break;
case GP2X_BUTTON_RIGHT: kright = 1; break;
case GP2X_BUTTON_SELECT: prefsloopdone = 1; break;
case GP2X_BUTTON_B: prefsloopdone = 1; break;
#endif
}
}
if
(
event
.
type
==
SDL_KEYDOWN
)
{
switch
(
event
.
key
.
keysym
.
sym
)
{
case
SDLK_ESCAPE
:
prefsloopdone
=
1
;
break
;
case
SDLK_UP
:
seciliola
n
--
;
break
;
case
SDLK_DOWN
:
seciliola
n
++
;
break
;
case
SDLK_UP
:
menuSelectio
n
--
;
break
;
case
SDLK_DOWN
:
menuSelectio
n
++
;
break
;
case
SDLK_LEFT
:
kleft
=
1
;
break
;
case
SDLK_RIGHT
:
kright
=
1
;
break
;
case
SDLK_b
:
prefsloopdone
=
1
;
break
;
...
...
@@ -93,30 +108,30 @@ int prefz (int parametre) {
}
}
if
(
kleft
==
1
)
{
defaults
[
seciliola
n
]
--
;
defaults
[
menuSelectio
n
]
--
;
kleft
=
0
;
if
(
seciliola
n
==
1
)
{
if
(
menuSelectio
n
==
1
)
{
//cpu_speed_change = 1;
}
if
(
seciliola
n
==
6
)
{
if
(
menuSelectio
n
==
6
)
{
//snd_change = 1;
}
if
(
seciliola
n
==
7
)
{
if
(
menuSelectio
n
==
7
)
{
//gfx_frameskip_change = 1;
}
}
if
(
kright
==
1
)
{
defaults
[
seciliola
n
]
++
;
defaults
[
menuSelectio
n
]
++
;
kright
=
0
;
if
(
seciliola
n
==
1
)
{
if
(
menuSelectio
n
==
1
)
{
//cpu_speed_change = 1;
}
if
(
seciliola
n
==
6
)
{
if
(
menuSelectio
n
==
6
)
{
//snd_change = 1;
}
if
(
seciliola
n
==
7
)
{
if
(
menuSelectio
n
==
7
)
{
//gfx_frameskip_change = 1;
}
}
...
...
@@ -141,8 +156,8 @@ int prefz (int parametre) {
if
(
defaults
[
7
]
>
3
)
defaults
[
7
]
=
0
;
//frameskip
if
(
defaults
[
8
]
>
3
)
defaults
[
8
]
=
0
;
//floppy
if
(
seciliolan
<
0
)
{
seciliola
n
=
8
;
}
if
(
seciliolan
>
8
)
{
seciliola
n
=
0
;
}
if
(
menuSelection
<
0
)
{
menuSelectio
n
=
8
;
}
if
(
menuSelection
>
8
)
{
menuSelectio
n
=
0
;
}
// background
SDL_BlitSurface
(
pMenu_Surface
,
NULL
,
tmpSDLScreen
,
NULL
);
...
...
@@ -150,7 +165,7 @@ int prefz (int parametre) {
int
sira
=
0
;
int
skipper
=
0
;
for
(
q
=
0
;
q
<
9
;
q
++
)
{
if
(
seciliola
n
==
q
)
{
if
(
menuSelectio
n
==
q
)
{
text_color
.
r
=
150
;
text_color
.
g
=
50
;
text_color
.
b
=
50
;
}
write_text
(
10
,
skipper
+
25
+
(
sira
*
10
),
prefs
[
q
]);
//
...
...
@@ -181,7 +196,11 @@ int prefz (int parametre) {
write_text
(
25
,
6
,
msg
);
//
write_text
(
25
,
240
,
msg_status
);
//
SDL_BlitSurface
(
tmpSDLScreen
,
NULL
,
display
,
NULL
);
#ifdef TOUCHUI
SDL_TUI_UpdateAll
();
#endif
SDL_Flip
(
display
);
}
//while done
/*
...
...
src/gui-sdl/menu_tweak.c
View file @
41090d16
#include "SDL.h"
#include "gp2x.h"
#include <stdlib.h>
#include "gp2x-cpuctrl/cpuctrl.h"
#ifdef TOUCHUI
#include <SDL_TouchUI.h>
#endif
extern
void
write_text
(
int
x
,
int
y
,
char
*
txt
);
extern
void
blit_image
(
SDL_Surface
*
img
,
int
x
,
int
y
);
...
...
@@ -22,7 +24,7 @@ int tweakz (int parametre) {
int
kleft
=
0
;
int
kright
=
0
;
int
kb
=
0
;
int
seciliola
n
=
0
;
int
menuSelectio
n
=
0
;
int
q
;
char
*
tweaks
[]
=
{
"CPU Mhz"
,
"tRC"
,
"tRAS"
,
"tWR"
,
"tMRD"
,
"tRFC"
,
"tRP"
,
"tRCD"
,
"PLL"
,
"Timing"
,
"Default (200mhz)"
,
"Default (266mhz)"
,
"Evil Dragon (266mhz)"
};
...
...
@@ -33,6 +35,10 @@ int tweakz (int parametre) {
char
*
tmp
;
tmp
=
(
char
*
)
malloc
(
5
);
if
(
display
==
NULL
)
{
gui_init
();
}
#ifdef GP2X
unsigned
sysfreq
=
0
;
int
cpufreq
;
...
...
@@ -52,22 +58,27 @@ int tweakz (int parametre) {
while
(
!
tweakloopdone
)
{
while
(
SDL_PollEvent
(
&
event
))
{
#ifdef TOUCHUI
SDL_TUI_HandleEvent
(
&
event
);
#endif
if
(
event
.
type
==
SDL_QUIT
)
{
tweakloopdone
=
1
;
}
if
(
event
.
type
==
SDL_JOYBUTTONDOWN
)
{
switch
(
event
.
jbutton
.
button
)
{
case
GP2X_BUTTON_UP
:
seciliolan
--
;
break
;
case
GP2X_BUTTON_DOWN
:
seciliolan
++
;
break
;
#if 0
case GP2X_BUTTON_UP: menuSelection--; break;
case GP2X_BUTTON_DOWN: menuSelection++; break;
case GP2X_BUTTON_LEFT: kleft = 1; break;
case GP2X_BUTTON_RIGHT: kright = 1; break;
case GP2X_BUTTON_SELECT: tweakloopdone = 1; break;
case GP2X_BUTTON_B: kb =1; break;
#endif
}
}
if
(
event
.
type
==
SDL_KEYDOWN
)
{
switch
(
event
.
key
.
keysym
.
sym
)
{
case
SDLK_ESCAPE
:
tweakloopdone
=
1
;
break
;
case
SDLK_UP
:
seciliola
n
--
;
break
;
case
SDLK_DOWN
:
seciliola
n
++
;
break
;
case
SDLK_UP
:
menuSelectio
n
--
;
break
;
case
SDLK_DOWN
:
menuSelectio
n
++
;
break
;
case
SDLK_LEFT
:
kleft
=
1
;
break
;
case
SDLK_RIGHT
:
kright
=
1
;
break
;
case
SDLK_b
:
kb
=
1
;
break
;
...
...
@@ -76,16 +87,17 @@ int tweakz (int parametre) {
}
}
if
(
kb
==
1
)
{
if
(
seciliola
n
==
10
)
{
if
(
menuSelectio
n
==
10
)
{
for
(
q
=
0
;
q
<
10
;
q
++
)
{
defaults
[
q
]
=
def_slow_tweak
[
q
];
}
}
if
(
seciliola
n
==
11
)
{
if
(
menuSelectio
n
==
11
)
{
for
(
q
=
0
;
q
<
10
;
q
++
)
{
defaults
[
q
]
=
def_fast_tweak
[
q
];
}
}
if
(
seciliola
n
==
12
)
{
if
(
menuSelectio
n
==
12
)
{
for
(
q
=
0
;
q
<
10
;
q
++
)
{
defaults
[
q
]
=
evil_tweak
[
q
];
}
}
if
(
seciliolan
<
10
)
{
if
(
menuSelection
<
10
)
{
#if 0
//apply
//printf("FLCK: %d",0); set_CAS(0);
printf("FLCK: %d",defaults[0]); set_FCLK(defaults[0]);
...
...
@@ -101,16 +113,17 @@ int tweakz (int parametre) {
} else {
printf("ULCD: %d",defaults[9]); set_add_ULCDCLK(defaults[9]-1);
}
#endif
tweakloopdone
=
1
;
}
kb
=
0
;
}
if
(
kleft
==
1
)
{
if
(
seciliolan
<
10
)
{
defaults
[
seciliola
n
]
--
;
}
if
(
menuSelection
<
10
)
{
defaults
[
menuSelectio
n
]
--
;
}
kleft
=
0
;
}
if
(
kright
==
1
)
{
if
(
seciliolan
<
10
)
{
defaults
[
seciliola
n
]
++
;
}
if
(
menuSelection
<
10
)
{
defaults
[
menuSelectio
n
]
++
;
}
kright
=
0
;
}
...
...
@@ -135,8 +148,8 @@ int tweakz (int parametre) {
if
(
defaults
[
7
]
==
0
)
defaults
[
7
]
=
16
;
//trcd
if
(
defaults
[
8
]
==
11
)
defaults
[
7
]
=
-
6
;
//timing
if
(
seciliolan
<
0
)
{
seciliola
n
=
12
;
}
if
(
seciliolan
>
12
)
{
seciliola
n
=
0
;
}
if
(
menuSelection
<
0
)
{
menuSelectio
n
=
12
;
}
if
(
menuSelection
>
12
)
{
menuSelectio
n
=
0
;
}
// background
SDL_BlitSurface
(
pMenu_Surface
,
NULL
,
tmpSDLScreen
,
NULL
);
...
...
@@ -146,7 +159,7 @@ int tweakz (int parametre) {
int
skipper
=
0
;
for
(
q
=
0
;
q
<
13
;
q
++
)
{
if
(
q
==
10
)
{
skipper
=
30
;
}
if
(
seciliola
n
==
q
)
{
if
(
menuSelectio
n
==
q
)
{
text_color
.
r
=
255
;
text_color
.
g
=
100
;
text_color
.
b
=
100
;
}
write_text
(
10
,
skipper
+
25
+
(
sira
*
10
),
tweaks
[
q
]);
//
...
...
@@ -162,7 +175,7 @@ int tweakz (int parametre) {
}
write_text
(
100
,
skipper
+
25
+
(
sira
*
10
),
tmp
);
}
if
(
seciliola
n
==
q
)
{
if
(
menuSelectio
n
==
q
)
{
text_color
.
r
=
0
;
text_color
.
g
=
0
;
text_color
.
b
=
0
;
}
sira
++
;
...
...
@@ -170,7 +183,11 @@ int tweakz (int parametre) {
write_text
(
25
,
3
,
msg
);
write_text
(
15
,
228
,
msg_status
);
SDL_BlitSurface
(
tmpSDLScreen
,
NULL
,
display
,
NULL
);
#ifdef TOUCHUI
SDL_TUI_UpdateAll
();
#endif
SDL_Flip
(
display
);
}
//while done
...
...
src/gui-sdl/volumecontrol.c
View file @
41090d16
#include <SDL.h>
#include "gp2x.h"
#include "volumecontrol.h"
...
...
src/sysconfig.h.in
View file @
41090d16
/* src/sysconfig.h.in. Generated from configure.in by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* CPU is 64bit */
#undef CPU_64_BIT
/* we want ecs_denise */
#undef ECS_DENISE
...
...
@@ -165,7 +171,7 @@
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if `st_blocks' is member of `struct stat'. */
/* Define to 1 if `st_blocks' is
a
member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
...
...
@@ -300,6 +306,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
...
...
@@ -371,29 +380,62 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Version number of package */
#undef VERSION
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment