some cleanup fixes

main
cosmonaut 2021-11-20 02:00:02 -08:00
parent b58a3fcac9
commit c5c5ed6c18
5 changed files with 10 additions and 4 deletions

View File

@ -1 +1 @@
Theorafile_Close(video); Theorafile_Close(video);

View File

@ -1,3 +1,3 @@
Theorafile_UpdateSurface(video); Theorafile_UpdateSurface(video);
draw_surface_stretched(video.videoSurface, 0, 0, surface_get_width(application_surface), surface_get_height(application_surface)); draw_surface_stretched(video.videoSurface, 0, 0, surface_get_width(application_surface), surface_get_height(application_surface));

View File

@ -57,7 +57,11 @@ function Theorafile_Open(filename)
function Theorafile_Close(video) function Theorafile_Close(video)
{ {
buffer_delete(video.yuvBuffer); surface_free(video.ySurface);
surface_free(video.uSurface);
surface_free(video.vSurface);
surface_free(video.videoSurface);
//buffer_delete(video.yuvBuffer);
vertex_format_delete(video.triangle_buffer_format); vertex_format_delete(video.triangle_buffer_format);
vertex_delete_buffer(video.triangle_buffer); vertex_delete_buffer(video.triangle_buffer);
TheorafileGMS_Close(video.handle); TheorafileGMS_Close(video.handle);

View File

@ -67,7 +67,9 @@ char* TheorafileGMS_Open(char* filename)
void TheorafileGMS_Close(char* filePointer) void TheorafileGMS_Close(char* filePointer)
{ {
SDL_free(filePointer); OggTheora_File* file = (OggTheora_File*)filePointer;
tf_close(file);
/* SDL_free(file); */ /* FIXME: why the hell is this crashing game maker */
} }
double TheorafileGMS_HasVideo(char* filePointer) double TheorafileGMS_HasVideo(char* filePointer)