forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[PSP] pspsdk pspdebug patch

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> Patch Submissions
View previous topic :: View next topic  
Author Message
lego



Joined: 17 Oct 2008
Posts: 43

PostPosted: Sun Nov 01, 2009 10:52 pm    Post subject: [PSP] pspsdk pspdebug patch Reply with quote

Hi, all.

After this problem - pspgl & pspDebugScreenPrintf() - I made this simple patch:

Code:

~$ cd trunk/pspsdk/src
~$ svn diff
Index: debug/scr_printf.c
===================================================================
--- debug/scr_printf.c  (revision 2474)
+++ debug/scr_printf.c  (working copy)
@@ -188,6 +188,16 @@
        g_vram_mode = mode;
 }
 
+void pspDebugScreenSetMaxX(unsigned int maxx)
+{
+       MX = maxx;
+}
+
+void pspDebugScreenSetMaxY(unsigned int maxy)
+{
+       MY = maxy;
+}
+
 int pspDebugScreenGetX()
 {
        return X;
Index: debug/pspdebug.h
===================================================================
--- debug/pspdebug.h    (revision 2474)
+++ debug/pspdebug.h    (working copy)
@@ -117,6 +117,21 @@
  */
 void pspDebugScreenSetBase(u32* base);
 
+/**
+ * Set the X maximum coordinate (in character units)
+ * @note Thus line length will be X + 1 characters.
+ *
+ * @param maxx - The X maximum coordinate
+ */
+void pspDebugScreenSetMaxX(unsigned int maxx);
+
+/**
+ * Set the Y maximum coordinate (in character units)
+ *
+ * @param maxx - The X maximum coordinate
+ */
+void pspDebugScreenSetMaxY(unsigned int maxy);
+
 /**
   * Get the current X co-ordinate (in character units)
   *
~$


Now, in my code I do:

Code:

pspDebugScreenSetMaxX(32);
pspDebugScreenSetMaxY(17);


and my printf output with pspgl looks nice.

May be my problem resolves another way, but in any case this two functions will be good addition to the pspsdk, I think :-).
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Mon Nov 02, 2009 3:02 am    Post subject: Reply with quote

Added in rev 2487
Back to top
View user's profile Send private message
lego



Joined: 17 Oct 2008
Posts: 43

PostPosted: Mon Nov 02, 2009 3:13 am    Post subject: Reply with quote

Thanks :-)!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> Patch Submissions All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group