Toma400 / The_Isle_of_Ansur

Python-based text RPG game, successor of Between Shadows and Light.
Other
9 stars 0 forks source link

Resolution change sometimes crash the game #52

Closed Toma400 closed 1 year ago

Toma400 commented 1 year ago

Changing resolution (at least via L/R mouse buttons) sometimes result in crashing the game - resolution is changed for second run, but game is quit.

It prints out log issue: 2022_9_19_11_38_46_log.log

This is traceback part of the log:

[2022-09-19 13:38:52,288] [CRITICAL] [Main chain stopped. Printing the issue.]
Traceback (most recent call last):
  File "D:\Ministerstwo Kalibracyjne\PyCharm_Projects\Isle_of_Ansur\main.py", line 34, in <module>
    main_circle()
  File "D:\Ministerstwo Kalibracyjne\PyCharm_Projects\Isle_of_Ansur\core\circles.py", line 29, in main_circle
    gui_handler(screen, guitype, forged_events, pg_events, tev, bgs, dyn_screen) # draws elements on a screen and sets interactions
  File "D:\Ministerstwo Kalibracyjne\PyCharm_Projects\Isle_of_Ansur\core\graphics\gui_types.py", line 115, in gui_handler
    put_text(screen, text=langstring("menu__sett_general_lang"), font_cat="menu", size=30, align_x="right", pos_x=15, pos_y=20, colour="#7C613B")
  File "D:\Ministerstwo Kalibracyjne\PyCharm_Projects\Isle_of_Ansur\core\graphics\text_manag.py", line 26, in put_text
    if not no_blit: screen.blit(txtobj, (pos_x, pos_y))
pygame.error: display Surface quit
Toma400 commented 1 year ago

Fixed with 5a6f2c5.