There seems to be a lot of duplicated code between main/main.c (used for mupen64_nogui) and main/gui_gtk/main_gtk.c (used for mupen64). Worse, main.c has some bugs that main_gtk.c does not. For example, on my system, the same video plugin is choppy using mupen64_nogui, but smooth using mupen64. I haven't tracked down the exact cause of this bug, but again, I'm guessing it leads back to something that's already fixed in the gui version. But main.c also has some features (many commandline options) that main_gtk.c does not.
So I'd like to propose combining the two into one mupen64 exe that has a --nogui switch (in addition to all of the other commandline options currently provided by mupen64_nogui). All of the common code would go in main/main.c and main/gui_gtk/main_gtk.c would be used for all of the gtk-specific functions. I would use the current main_gtk.c as the basis for the new common main.c since it's more maintained and seems to work better than the current main.c. Then I'd separate all of the gui-specific code into a new main_gtk.c file.
I just wanted to get people's thoughts on this before I went ahead and started working on the fix.
So I'd like to propose combining the two into one mupen64 exe that has a --nogui switch (in addition to all of the other commandline options currently provided by mupen64_nogui). All of the common code would go in main/main.c and main/gui_gtk/main_gtk.c would be used for all of the gtk-specific functions. I would use the current main_gtk.c as the basis for the new common main.c since it's more maintained and seems to work better than the current main.c. Then I'd separate all of the gui-specific code into a new main_gtk.c file.
I just wanted to get people's thoughts on this before I went ahead and started working on the fix.