| View previous topic :: View next topic |
| Author |
Message |
lego
Joined: 17 Oct 2008 Posts: 43
|
Posted: Sun Nov 01, 2009 10:52 pm Post subject: [PSP] pspsdk pspdebug patch |
|
|
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 |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Mon Nov 02, 2009 3:02 am Post subject: |
|
|
| Added in rev 2487 |
|
| Back to top |
|
 |
lego
Joined: 17 Oct 2008 Posts: 43
|
Posted: Mon Nov 02, 2009 3:13 am Post subject: |
|
|
| Thanks :-)! |
|
| Back to top |
|
 |
|