(12-03-2012, 06:28 PM)NeKit Wrote: I've investigated the problem a bit further. The game is calling sceFontGetCharInfo with 0xD as char argument:Nice finding!
It's not present in the font (jpn0.pgf, even if it's extracted from PSP), so font.fontInfo.getCharInfo() results in null and JPCSP tries to provide default DebugFont values. Looks like it's not what game expects to get. Simply initializing pspCharInfo and not setting anything fixes manual line breaks in game, so I've added a check if char code is higher or equal to 0x20. Characters below are not supposed to be printable anyway, so I hope it won't have any negative side effects.Code:50736 user_main DEBUG hle.sceFont sceFontGetCharInfo charCode=000D (
)
50741 user_main DEBUG hle.sceFont sceFontGetCharInfo returning bitmapWidth=16, bitmapHeight=16, bitmapLeft=0, bitmapTop=0, sfp26Width=1024, sfp26Height=1024, sfp26Ascender=0, sfp26Descender=0, sfp26BearingHX=0, sfp26BearingHY=0, sfp26BearingVX=0, sfp26BearingVY=0, sfp26AdvanceH=1024, sfp26AdvanceV=1024
Fix added in r2895: I've tested it on a real PSP to implement the proper behavior.
Thank you!
Always include a complete log file at INFO level in your reports. Thanks! How to post a log