Skip to content

Commit

Permalink
Check for plugin updates in version 2.00 and higher
Browse files Browse the repository at this point in the history
  • Loading branch information
ONElua authored Aug 17, 2023
1 parent defbfe5 commit f714482
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 5 additions & 1 deletion AUTOPLUG2/git/thread_net.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ if info then
if version > APP_VERSION then
__VERSION = 1
UPDATE_PORT:push({version, tostring(info[2] or "")})
elseif version == APP_VERSION then
end
if version == APP_VERSION then
__VERSION = 2
--2.00 = 33554432
elseif version >= 33554432 then
__VERSION = 3
end
end
end
Expand Down
3 changes: 1 addition & 2 deletions AUTOPLUG2/menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,13 @@ function menu_gral()
if back then back:blit(0,0) end
message_wait(LANGUAGE["MENU_PSVITA_CHECK_ONLINE_PLUGINS_DESC"])
os.delay(750)
cont_global:set(tonumber(0))
psvita_plugins_online()
cont_global:set(tonumber(0))
end

draw.fillrect(0,0,960,55,color.shine:a(15))
--draw.offsetgradrect(0,0,960,55,color.shine:a(85),color.shine:a(135),0x0,0x0,20)
screen.print(480,20,LANGUAGE["MENU_TITLE"],1.0,color.white,color.blue,__ACENTER)

local y = 115
for i=scroll.ini, scroll.lim do
if i == scroll.sel then draw.offsetgradrect(5,y-15,950,45,color.shine:a(65),color.shine:a(40),0x0,color.shine:a(5),21) end
Expand Down
10 changes: 8 additions & 2 deletions AUTOPLUG2/scripts/psvita/menu_psvita.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ end

local onlineplugins_callback = function ()
psvita_plugins_online()
--Main Cycle
dofile("menu.lua")
end

local downloads_callback = function ()
Expand Down Expand Up @@ -64,9 +66,13 @@ function menu_ps()
{ text = LANGUAGE["MENU_PSVITA_INSTALL_SD2VITA"], desc = LANGUAGE["MENU_PSVITA_INSTALL_SD2VITA_DESC"], funct = sd2vita_callback },
{ text = LANGUAGE["MENU_DOWNLOADS"], desc = LANGUAGE["MENU_EXTRAS_DOWNLOADS_DESC"], funct = downloads_callback },
{ text = LANGUAGE["MENU_PSVITA_HD_PATCH"], desc = LANGUAGE["MENU_PSVITA_HD_PATCH_DESC"], funct = hd_patch_callback },
{ text = LANGUAGE["MENU_PSVITA_INSTALL_NEAREST"], desc = LANGUAGE["INSTALLP_DESC_VITANEARESTN"], funct = VitaNearest_callback },
{ text = LANGUAGE["MENU_PSVITA_INSTALL_NEAREST"], desc = LANGUAGE["INSTALLP_DESC_VITANEARESTN"], funct = VitaNearest_callback },
}

if tonumber(cont_global:get()) > 0 and yes_update and tonumber(yes_update:get()) == 3 then
table.insert(menu, { text = LANGUAGE["MENU_PSVITA_CHECK_ONLINE_PLUGINS"].." ( "..tonumber(cont_global:get()).." )", desc = LANGUAGE["MENU_PSVITA_CHECK_ONLINE_PLUGINS_DESC"], funct = onlineplugins_callback } )
end

local scroll = newScroll(menu,#menu)
local xscroll = 10

Expand Down Expand Up @@ -117,7 +123,7 @@ function menu_ps()
end

if buttons.cancel then break end
if buttons.accept then menu[scroll.sel].funct() end
if buttons.accept then menu[scroll.sel].funct() end

vol_mp3()

Expand Down

0 comments on commit f714482

Please sign in to comment.