Exit in GP2X

Previous topic - Next topic

Moru

I'm having troubles quitting from an application on GP2X. If I press the volume + and - buttons it just locks up. Same if I set up the start button to quit.

I'm also having troubles drawing with polygons on GP2X. Nothing shows up. I included the project with simple source and precompiled for GP2X. Works fine on the PC, works on GP2X but hangs up when quitting, no polygon showing up.

Code (glbasic) Select
// --------------------------------- //
// Project: GP2X Test
// Start: Monday, October 19, 2009
// IDE Version: 7.145

LOADFONT "smalfont.png", 1
SETFONT 1

LOCAL y1%, y2%

WHILE KEY(28) = 0
STARTPOLY -1
POLYVECTOR 0,0,     0,0, RGB(255,255,255)
POLYVECTOR 0,239,   0,0, RGB(100,200,255)
POLYVECTOR 319,239, 0,0, RGB(255,255,255)
POLYVECTOR 319,0,   0,0, RGB(255,255,0)
ENDPOLY
PRINT "Test, should be light background", 0, 10
y1 = RND(20)
y2 = RND(20)
DRAWLINE 0,y1+50,319,y2+50, RGB(0,255,0)
DRAWLINE 0,y2+50,319,y1+50, RGB(255,0,0)
SHOWSCREEN
WEND



[attachment deleted by admin]

gavendortt

I think you just have to put "End" just after the last line of your code, this will literally stop the program.

Kitty Hello

#2
Ooops. Looks like a bug.

[edit]
The drawing bug is fixed now.

Moru

Yes, polyvector works fine again!

But the exit problem is still there, is anyone else having this problem or is it my unit?

Moru

I'm still having troubles with exiting from a GP2X application. The older programs created with GLBasic works but newer just locks up on exit.

Kitty Hello

OK, next update. on top of my TODO. Phew - now I just need to find my gp2x ...

Kitty Hello

I'm on Open2X and it works. Do you have the original FW on it?

If so, do you have an F100 or F200?

Moru

Original firmware, version 3.0

GP2X F100

Ian Price

VOL+ and VOL- are locking up F200 too.
I came. I saw. I played.

Ian Price

GP2X still doesn't exit properly Gernot... ;)
I came. I saw. I played.

Kitty Hello

See the file "myprogram.gpe" -> it's a text file (unix line ends - use Notepad2 e.g.)
That calls the gp2x.prg executable and should try to start the menu later.
There might be a bug. It says: "./gp2xmenu" at the end, but might require "/usr/gp2x/gp2xmenu".

I'll have to test, but the kids are asleep and they have my gp2x.

Ian Price

It's a crying shame that kids would rather sleep with an electronic device than a teddy bear nowadays :P

No worries Gernot. It's not something that I'm really concerned about (SantaMania is probably going to be my last GP2X project anyway).

I'll have a go with your text file later and let you know how I get on.  :)

I came. I saw. I played.

Kitty Hello

Hehe.
I wrote a program where they can flip through some mp3 ferry (fairy?) tales and play. And after it's done, the CPU gets clocked to 60MHz to safe battery and the display goes black, so they can sleep tight. They ruined a bunch of CD players already ...

Moru

Still no luck with exiting GP2X applications even after inserting
./usr/gp2x/gp2xmenu
into the gp2x.gpe file.

Kitty Hello

make sure the file is \n terminated (Unix line breaks) Use Notepad2 or so for that. The most windows programs can't do that.