Sonic and Sega Retro Message Board: Gens/GS Release 7 - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Gens/GS Release 7 finally :D

#61 User is online Spanner 

Posted 20 March 2010 - 03:38 PM

  • I used to go by SOTI too...
  • Posts: 2659
  • Joined: 02-June 07
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic the Hedgehog Hacking Contest, Other Stuff
  • Wiki edits:2,193
QUOTE (Corner-Face-Jacks @ Mar 20 2010, 08:35 PM)
Testing Sonic The Hedgehog: Harder Levels v1.0 on Ubuntu 10.04 beta 1 (Linux). Looks good n stable wink.png

The only bad thing there is the Ubuntu button placement. smile.png

#62 User is offline Corner-Face-Jacks 

Posted 20 March 2010 - 03:45 PM

  • Posts: 14
  • Joined: 11-August 09
  • Gender:Male
  • Location:Dublin,Ireland
  • Wiki edits:1
Yeah Mark Shuttleworth says he wants to put a feature on the right side bar at release time.

#63 User is offline sonicblur 

Posted 10 August 2010 - 08:54 PM

  • Posts: 556
  • Joined: 18-February 08
  • Gender:Male
  • Wiki edits:6
Some fixes were needed for this to build on Mac OS X Snow Leopard.

First of all, the 64-bit thing that you're already aware of that was solved by the m32 flags.

cpuflags.c in gens_core/misc
check_os_level_sse is failing to compile because it doesn't know what sighandler_t is for some reason. I just made this return true since we know all Intel Macs have SSE. There's probably a correct way to fix this.

gens_menu_callbacks.cpp
Line 843
Move #endif below the case IDM_HELP_REPORTABUG, because IDM_HELP_REPORTABUG isn't defined on OS X per your #ifdef in another file.

scalebit_4x.c
Line 48
Change #include <malloc.h> to #include <malloc/malloc.h>

scalebit_4x_mmx.c
Line 40
Change #include <malloc.h> to #include <malloc/malloc.h>


With that, the build completed successfully. Doesn't run though, appears crash inside of SDL while trying to create a window. Error (1002) creating CGSWindow

Edit: It looks like the SDL problem is common. SDL applications need to be started from SDL_Main on OS X because otherwise it doesn't get a chance to initialize some of the Cocoa stuff. The other option is to have a main declared in Objective C. I wonder why I never ran into this problem in m5.1? I guess I'll work on a separate main class, unless you have other ideas.

Edit 2: Success!


In g_main_unix.cpp, add
#ifdef GENS_OS_MACOSX
#include <dlfcn.h>
#endif
to the includes section

And
#ifdef GENS_OS_MACOSX
void* cocoa_lib;
cocoa_lib = dlopen( "/System/Library/Frameworks/Cocoa.framework/Cocoa", RTLD_LAZY );
void (*nsappload)(void);
nsappload = (void(*)()) dlsym( cocoa_lib, "NSApplicationLoad");
nsappload();
#endif
Somewhere near the beginning of main. I put it right after the end of the first if block. This is probably a very bad solution though, because it spews memory leak warnings to the console every time it draws a frame. Memory use doesn't appear to rise as you play though.

Edit 3: The reason I never ran into this before was because I was using the native quartz port of GTK, instead of the X11 version. I was having some problems with recent versions of Quartz GTK sucking, which is why I switched to X11. In other words, if you manage to build with Quartz GTK, this problem won't exist. (On port, the command is 'port install gtk2 +quartz +no_x11')
This post has been edited by sonicblur: 14 August 2010 - 11:58 AM

  • 5 Pages +
  • ◄ First
  • 3
  • 4
  • 5
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users