Skip to content

Custom FileSystem callbacks - #67

Merged
CedNaru merged 9 commits into
masterfrom
feature/filesystem
Jan 28, 2021
Merged

Custom FileSystem callbacks#67
CedNaru merged 9 commits into
masterfrom
feature/filesystem

Conversation

@CedNaru

@CedNaru CedNaru commented Jan 26, 2021

Copy link
Copy Markdown
Member

Implement #49

This PR implements FMOD filesystem callbacks. They replace the default behavior of FMOD when it tries to open files. Now, Godot will be the one opening the files and sending their content to FMOD.
With this, it's possible to open any file as you would normally do with Godot. Exported projects should work as well, it's no longer necessary to have the files next to the game executable, the pck file is enough.

When exporting a project, don't forget to add .bank and .ogg files in the options, otherwise Godot won't include them.
A draft, for now, I need to properly test that on Android and tidy the code a little.

@CedNaru
CedNaru marked this pull request as ready for review January 27, 2021 09:53
@CedNaru
CedNaru requested a review from piiertho January 27, 2021 09:53
@CedNaru

CedNaru commented Jan 27, 2021

Copy link
Copy Markdown
Member Author

I confirm that it properly runs on Android.

Comment thread src/callback/file_callbacks.cpp
Comment thread src/callback/file_callbacks.h
Comment thread src/callback/file_callbacks.cpp Outdated
Comment thread src/gdlibrary.cpp Outdated
Comment thread src/callback/event_callbacks.cpp
@piiertho

Copy link
Copy Markdown
Member

Only few changes but overall looks good !

@CedNaru
CedNaru requested a review from piiertho January 27, 2021 18:30
@CedNaru
CedNaru merged commit 4572b6f into master Jan 28, 2021
Comment thread src/gdlibrary.cpp
}

extern "C" void GDN_EXPORT fmod_gdnative_terminate(godot_gdnative_terminate_options *o){
delete Callbacks::GodotFileRunner::get_singleton();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved too quickly, singleton is now on stack

@piiertho
piiertho deleted the feature/filesystem branch February 18, 2021 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants