thanks for your work.
Unfortunately, just like the previous releases, it doesn't compile on linux at all.
so far I've got a couple of untested patches, but still digging up new compile errors. Is someone else already working on it, or should I continue trying?
Since I'm off to bed now and probably won't work on it tomorrow, I'll just dump what I got.
Joystick[] is declared in some windows header. Since I'm not familiar with that code, I just commented that part out on linux. Hope it's just some windows input code and not essential for linux - if it is, a whole lot of code from win32/ needs to be refactored & rewritten.
diff -uNr snes9x-improvement11-beta6-src_orig/gfx.cpp snes9x-improvement11-beta6-src/gfx.cpp
--- snes9x-improvement11-beta6-src_orig/gfx.cpp 2008-01-06 03:53:34.000000000 +0100
+++ snes9x-improvement11-beta6-src/gfx.cpp 2008-01-07 00:21:22.000000000 +0100
@@ -3519,7 +3519,11 @@
{
if((IPPU.Joypads[id] & 0xffff)
&& (S9xMovieActive() && S9xMovieControllers() & (1<<id)
- || !S9xMovieActive() && Joypad[id].Enabled))
+ || !S9xMovieActive()
+#if !defined(__linux)
+ && Joypad[id].Enabled
+#endif
+ ))
{
singlePlayer = false;
break;
GETC_STREAM and GETS_STREAM are nowhere defined in the source, and google doesn't turn up anything like it either. Is reader.cpp even compiled on windows? If so, how does it work?
I just replaced those with some implementations using read(). Unless I made a mistake, it'll be slow, but it'll work.
diff -uNr snes9x-improvement11-beta6-src_orig/reader.cpp snes9x-improvement11-beta6-src/reader.cpp
--- snes9x-improvement11-beta6-src_orig/reader.cpp 2007-04-29 02:51:18.000000000 +0200
+++ snes9x-improvement11-beta6-src/reader.cpp 2008-01-07 00:37:55.000000000 +0100
@@ -209,11 +209,34 @@
fReader::~fReader(void){}
int fReader::get_char(){
- return GETC_STREAM(fp);
+ unsigned char ret;
+ if (!read((char *) &ret, 1))
+ return EOF;
+ return (int) ret;
+
+ //return GETC_STREAM(fp);
}
char *fReader::gets(char *buf, size_t len){
- return GETS_STREAM(buf, len, fp);
+ int c = 0;
+ unsigned int idx = 0;
+ while (idx < len - 1)
+ {
+ c = get_char();
+ if (c == EOF)
+ {
+ if (idx == 0)
+ return NULL;
+ break;
+ }
+ buf[idx++] = c;
+ if (c == '\n')
+ break;
+ }
+ buf[idx] = '\0';
+ return buf;
+
+ //return GETS_STREAM(buf, len, fp);
}
size_t fReader::read(char *buf, size_t len){
someone forgot to adjust this function call when changing the signature, looks like this code hasn't been compiled on linux in a loooong time.
diff -uNr snes9x-improvement11-beta6-src_orig/sdd1.cpp snes9x-improvement11-beta6-src/sdd1.cpp
--- snes9x-improvement11-beta6-src_orig/sdd1.cpp 2008-01-03 08:57:00.000000000 +0100
+++ snes9x-improvement11-beta6-src/sdd1.cpp 2008-01-07 00:05:57.000000000 +0100
@@ -155,7 +155,7 @@
Memory.SDD1LoggedDataCount, fs);
fclose (fs);
#if defined(__linux)
- chown (S9xGetFilename (".dat"), getuid (), getgid ());
+ chown (S9xGetFilename (".dat", PATCH_DIR), getuid (), getgid ());
#endif
}
Memory.SDD1LoggedDataCountPrev = Memory.SDD1LoggedDataCount;
now getting errors about multiple declarations, saving the include tracing for later.