# HG changeset patch # User john.cylee@gmail.com # Date 1244802975 -28800 # Node ID 31b6633e3538772c09e4c33918eea4b2a3501891 # Parent 674717c2c3eee6236112ca795a2c2e6339d06e7e - Fix a minor error in src/sprite.c: should check *(s-1) instead of *s or the pointer will stop at '/', which is not what we want. - Fix various load path errors in examples because libtool put .so into .libs directory. - Fix an error in examples/dynamic/Makefile.am: scene_la_SOURCES should be scene.c instead of mytext.c diff -r 674717c2c3ee -r 31b6633e3538 examples/dynamic/Makefile.am --- a/examples/dynamic/Makefile.am Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/dynamic/Makefile.am Fri Jun 12 18:36:15 2009 +0800 @@ -35,7 +35,7 @@ mytext_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared -scene_la_SOURCES = mytext.c +scene_la_SOURCES = scene.c scene_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared diff -r 674717c2c3ee -r 31b6633e3538 examples/dynamic/hello.c --- a/examples/dynamic/hello.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/dynamic/hello.c Fri Jun 12 18:36:15 2009 +0800 @@ -48,7 +48,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("scene"); + myApp = MBApp_Init(".libs/scene"); data.currentscene=0; MBApp_setData(myApp,&data); //b = mb_button_new(myApp, myApp->rootsprite, "btn"); diff -r 674717c2c3ee -r 31b6633e3538 examples/dynamic/main.c --- a/examples/dynamic/main.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/dynamic/main.c Fri Jun 12 18:36:15 2009 +0800 @@ -121,7 +121,7 @@ mb_button_t *b; mb_sprite_t *sprite; - sprite = sprite_load("button", myApp->rdman, myApp->rdman->root_coord); + sprite = sprite_load(".libs/button", myApp->rdman, myApp->rdman->root_coord); b = mb_button_new(myApp->rdman, sprite, "btn"); mb_button_add_onClick(b, test,NULL); } @@ -140,7 +140,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("scene"); + myApp = MBApp_Init(".libs/scene"); data.currentscene=0; draw_text(); MBApp_setData(myApp,&data); diff -r 674717c2c3ee -r 31b6633e3538 examples/dynamic/text.c --- a/examples/dynamic/text.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/dynamic/text.c Fri Jun 12 18:36:15 2009 +0800 @@ -67,7 +67,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("mytext"); + myApp = MBApp_Init(".libs/mytext"); data.currentscene=0; MBApp_setData(myApp,&data); get_now(&tmo); diff -r 674717c2c3ee -r 31b6633e3538 examples/menu/filebrowser.c --- a/examples/menu/filebrowser.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/menu/filebrowser.c Fri Jun 12 18:36:15 2009 +0800 @@ -226,7 +226,7 @@ dir = argv[1]; else dir ="/tmp"; - myApp = MBApp_Init("browser"); + myApp = MBApp_Init(".libs/browser"); MBApp_setData(myApp,&data); MyApp_InitContent(dir); diff -r 674717c2c3ee -r 31b6633e3538 examples/menu/main.c --- a/examples/menu/main.c Fri Jun 12 11:23:59 2009 +0800 +++ b/examples/menu/main.c Fri Jun 12 18:36:15 2009 +0800 @@ -76,7 +76,7 @@ if (argc > 1) myApp = MBApp_Init(argv[1]); else - myApp = MBApp_Init("list"); + myApp = MBApp_Init(".libs/list"); MBApp_setData(myApp,&data); MyApp_InitContent(); diff -r 674717c2c3ee -r 31b6633e3538 src/sprite.c --- a/src/sprite.c Fri Jun 12 11:23:59 2009 +0800 +++ b/src/sprite.c Fri Jun 12 18:36:15 2009 +0800 @@ -57,7 +57,7 @@ return NULL; } s = name + strlen(name)-1; - while((s != name) && *s != '/') s--; + while((s != name) && *(s-1) != '/') s--; snprintf(path,sizeof(path), "%s_new", s); new = dlsym(handle,path); if (new == NULL) {