Just to get myself familiar with Lua and the PSP LuaPlayer I have been modifying the tutorial examples and doing simple test apps.
The following code is supposed to print hello world and count the number of presses of the up button (ooh exciting!).
However to get this to work it requires two flips rather than the one that should be required.
Code: Select all
green = Color.new(0, 255, 0)
Count=0
background = Image.load("background.png")
bInit = true
while true do
pad = Controls.read()
if(pad ~= oldpad) then
bInit =true
oldpad=pad
end
if(bInit ==true) then
bInit = false
if pad:start() then
break
end
if pad:up() then
Count=Count+1
end
screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false)
screen:print(200, 100, "Hello World!", green)
screen:print(200,150,Count,green)
-- wait for vertical sync and show new screen
screen.waitVblankStart()
screen:flip()
-- why the extra flip?
screen:flip()
end
end
I will try this out on an actual PSP once the Luaplayer is running on the GTA eboot loader.
Just wondering if this has been seen before (I noticed when I did a search of the forums that there are references to flickering on the windows player, possibly related?).
CC