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
Expand all
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
This diff is collapsed.
Click to expand it.
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