Adapting to SDL2 and Android.
SDL_ANYFORMAT is no more there and the flags field should be 0 in SDL2. Double / that would be get in the paths poses problems in the emulated filesystem we use for Android assets.
This commit is contained in:
parent
00b4aa126f
commit
7b872a02df
3 changed files with 8 additions and 8 deletions
|
|
@ -73,7 +73,7 @@ int pixels_init(magic_api * api)
|
|||
{
|
||||
char fname[1024];
|
||||
|
||||
snprintf(fname, sizeof(fname), "%s/sounds/magic/pixels.ogg", api->data_directory);
|
||||
snprintf(fname, sizeof(fname), "%ssounds/magic/pixels.ogg", api->data_directory);
|
||||
pixel_snd = Mix_LoadWAV(fname);
|
||||
|
||||
return (1);
|
||||
|
|
@ -95,7 +95,7 @@ SDL_Surface *pixels_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
|
|||
{
|
||||
char fname[1024];
|
||||
|
||||
snprintf(fname, sizeof(fname), "%s/images/magic/pixels.png", api->data_directory);
|
||||
snprintf(fname, sizeof(fname), "%simages/magic/pixels.png", api->data_directory);
|
||||
|
||||
return (IMG_Load(fname));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue