Les membres ayant 30 points peuvent parler sur les canaux annonces, projets et hs du chat.
La shoutbox n'est pas chargée par défaut pour des raisons de performances. Cliquez pour charger.

Forum Casio - Autres questions


Index du Forum » Autres questions » gint_setrestart(1) not working
Simnon Hors ligne Membre Points: 23 Défis: 0 Message

gint_setrestart(1) not working

Posté le 25/04/2025 19:42

at the start of the program, i call
gint_setrestart(1)
, then in a while loop i quit with
gint_osmenu(); return 0;

but when i get back to the program it isnt restarted and just quits on any button press.
starting a different app and going back restarts it


Lephenixnoir En ligne Administrateur Points: 25058 Défis: 174 Message

Citer : Posté le 25/04/2025 22:12 | #


Can you please specify which model you're running on and potentially provide a full program to test with?

Please note that the base case would be gint_setrestart(1) and then just return 0. Calling gint_osmenu() goes into the menu without exiting the main() function. Normally, calling gint_osmenu() is the superior solution compared to using gint_setrestart(). It seems a bit weird that you'd need to use both.
Mon graphe (28 Janvier): (MPM ; serial gint ; (Rogue Life || HH2) ; PythonExtra ; ? ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Simnon Hors ligne Membre Points: 23 Défis: 0 Message

Citer : Posté le 27/04/2025 12:17 | #


okay so i just use return 0 and it works, but i when i go into the app again, it shows the last thing it showed before it shut off until i press a key and then it works as if i just started it again. Is that normal?
Slyvtt Hors ligne Maître du Puzzle Points: 2597 Défis: 17 Message

Citer : Posté le 27/04/2025 12:53 | #


Yes it is normal. The state is save and restored. You need to update after returning to the addin
There are only 10 types of people in the world: Those who understand binary, and those who don't ...
Simnon Hors ligne Membre Points: 23 Défis: 0 Message

Citer : Posté le 27/04/2025 13:24 | #


can i update it automatically somehow
Lephenixnoir En ligne Administrateur Points: 25058 Défis: 174 Message

Citer : Posté le 27/04/2025 18:30 | #


Simnon a écrit :
okay so i just use return 0 and it works, but i when i go into the app again, it shows the last thing it showed before it shut off until i press a key and then it works as if i just started it again. Is that normal?

Not really, with gint_setrestart() when you come back it runs main() again. If main() draws a frame before it waits for input you shouldn't have this key-waiting period.

Note: you might be running into a limitation of gint_osmenu() however.
Mon graphe (28 Janvier): (MPM ; serial gint ; (Rogue Life || HH2) ; PythonExtra ; ? ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)

LienAjouter une imageAjouter une vidéoAjouter un lien vers un profilAjouter du codeCiterAjouter un spoiler(texte affichable/masquable par un clic)Ajouter une barre de progressionItaliqueGrasSoulignéAfficher du texte barréCentréJustifiéPlus petitPlus grandPlus de smileys !
Cliquez pour épingler Cliquez pour détacher Cliquez pour fermer
Alignement de l'image: Redimensionnement de l'image (en pixel):
Afficher la liste des membres
:bow: :cool: :good: :love: ^^
:omg: :fusil: :aie: :argh: :mdr:
:boulet2: :thx: :champ: :whistle: :bounce:
valider
 :)  ;)  :D  :p
 :lol:  8)  :(  :@
 0_0  :oops:  :grr:  :E
 :O  :sry:  :mmm:  :waza:
 :'(  :here:  ^^  >:)

Σ π θ ± α β γ δ Δ σ λ
Veuillez donner la réponse en chiffre
Vous devez activer le Javascript dans votre navigateur pour pouvoir valider ce formulaire.

Si vous n'avez pas volontairement désactivé cette fonctionnalité de votre navigateur, il s'agit probablement d'un bug : contactez l'équipe de Planète Casio.

Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2025 | Il y a 92 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements

Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd