Thought I'd share this, hoping someone would find it useful, and perhaps improve on it! If you use TinySMB with smb_devoptab developed by rodries and scip, put the following code into smb_devoptab.c to enable write support. /* Replace the existing function with this one */ int __smb_open(struct _reent *r, void *fileStruct, const char *path, int flags, int mode) { SMBFILESTRUCT *filby DrTwox - Coding
If you want to maintain a human readable file format, so you can edit the file with any text editor, you can write integers to a file as a char array (string), and when you read them back, convert the string back to an integer using atoi. To convert the integer to a string for saving, you would usually use itoa, but devkitPro/libogc do not include this function, as it is non standard, and theby DrTwox - Coding
QuoteWARNING : important test for possible bug/drawbacks I too was having the same problem (see an earlier post) with a small example app I wrote to test the library. However, the problem seemed to vanish one I integrated the syslog code into my real app as a replacement for the existing logging functions. I use wifi, Linux, wiiload + syslog-ng, port 514. Is it necessary, in a real app, toby DrTwox - Coding
Strangely, it was only the little example/test app I made that had the problem. I've replaced my own logging system in WiiMP with your syslog code and it works perfectly.by DrTwox - Coding
Thanks for the help! If LWP_MutexLock returns < 0 on failure, what conditions would cause a failure and should I be checking for them?by DrTwox - Coding
Hi all. Forgive me if this is a daft question! I have read the libogc mutex documentation, but I am unsure about something; When using mutex locks, which is the correct way to get a lock? Do you simply call LWP_MutexLock(lock) or do I need to use while and wait for LWP_MutexLock to return 0? //global mutex_t lock; void InitFunction() { LWP_MutexInit(lock); } void Function_1() {by DrTwox - Coding
Very good idea; works great! Do you plan on making it thread safe? Edit: I'm finding when (different) messages are sent in quick succession, only the first message is logged. Not sure if it's an issue with my setup (syslog-ng on Debian stable) or the code. To test it, I put sleep(1) after each Syslog_Send, and all the messages log fine, but obviously that isn't practical. Quoteaby DrTwox - Coding
Try use the device prefix... char filename="sd:/data/en/english.xml";by DrTwox - Coding
Quotelordzid-static is a linker flag. If you can't figure it out from there, perhaps you should pursue a career in the arts instead. That is about the most unhelpful, rude comment I've seen on this forum; how about you help the guy instead of acting like a know-it-all jackass? Anyway CurlyPaul, this post might be help to you:by DrTwox - Coding
Quotehenke37You seem to have some badly damaged include directives there. That's the forum software screwing up his post, not a problem with his code. It chops out anything between the < >, thinking it's html of some sort.by DrTwox - Coding
Thanks for the suggestion, I'll try it out. Quote...since you're changing the size of boolean from a 32-bit type in your jpeg header... That's what I don't understand; it's not MY header, it's the libjpeg standard header. Why has this issue not come up before with other projects using libjpeg?by DrTwox - Coding
Yeah, even with a 'make clean' the crash happens. Here's what I've discovered so far... * My main app (WiiMP) already uses the jpeg functions without the jpgogc wrapper, WITHOUT ANY ERRORS; this is what has me confused. I'm trying to "port" the jpeg functions from my graphics code to GRRLIB, so users of that library can benefit from proper jpg support. It's thiby DrTwox - Coding
Hi all, I apologise in advance for the messy state of this post - but I really don't know where to begin... I've installed the libjpeg-wii-gc library into my libogc directory, #included jpeglib.h in my project, but I get this error when I compile: In file included from /opt/devkitPRO//libogc/include/jpeg/jpeglib.h:26, from /home/drtwox/C/Wii/wiimp/source/libgby DrTwox - Coding
Quotebut there is no file on that link If you click the link it loads the wiki page and the file link is at the top - 'Grrfreetype.zip'. The source is in the zip file.by DrTwox - Coding
For those of you using GRRLIB, here's a very basic implementation of GRRLIB with libfreetype. I've included a sample program to test it with, and have commented where I've added new code to grrlib.c and grrlib.h. You will need libfreetype installed in your libogc directory if you want to compile it yourself. The included font is Bitstream Vera Sans. (Please ignore the numerous sby DrTwox - Coding
Hi everyone. Is there a function call in libogc to return the language settings for the Wii? WiiMP supports multiple languages via a user changeable option, but I'd like to automatically select an appropriate string translation file (if one exists) at startup. Note: I don't mean the J, U or E regions! Thanks.by DrTwox - Coding
Hi all, I've put a working port of sqlite up on WiiMP svn. Use svn checkout http://wiimp.googlecode.com/svn/trunk/sqlite3 sqlite to get the source. As said in the README, this is a very rough port, but so far it has worked fine for me. Use 'make install' to install the library and header to your libogc directory, and link in your projects with -lsqlite3.by DrTwox - Coding