Skip to content

Commit

Permalink
checks types have been initialised
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed Jan 1, 2024
1 parent adefaf8 commit be3f75a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ else()
target_link_libraries(Hop glew zlibstatic FreeType glm stduuid ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES} glfw Lua Miniaudio)
endif()

add_library(FreeType ALIAS freetype)

add_subdirectory(tools/)

IF (BUILD_DEMOS)
Expand Down
2 changes: 0 additions & 2 deletions demo/desktop/perlinWorld/sfml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ set(CMAKE_MODULE_PATH ../../include/SFML-2.5.1/cmake)

# graphics for sf::RenderWindow (window is in sfml-window)

add_library(FreeType ALIAS freetype)

find_package(SFML 2.5.1 COMPONENTS graphics REQUIRED)

add_executable(${OUTPUT_NAME}
Expand Down
2 changes: 0 additions & 2 deletions demo/desktop/softBodyTetris/sfml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ set(CMAKE_MODULE_PATH ../../include/SFML-2.5.1/cmake)

# graphics for sf::RenderWindow (window is in sfml-window)

add_library(FreeType ALIAS freetype)

find_package(SFML 2.5.1 COMPONENTS graphics REQUIRED)

add_executable(${OUTPUT_NAME}
Expand Down
6 changes: 4 additions & 2 deletions include/System/Sound/sSound.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ namespace Hop::System::Sound
~sSound()
{
ma_engine_uninit(&engine);
ma_device_uninit(&device);
ma_decoder_uninit(&decoder);
if (deviceInUse) { ma_device_uninit(&device); }
if (decoderInUse != DECODER::NONE) { ma_decoder_uninit(&decoder); }
}

ma_result decode(std::string file)
Expand Down Expand Up @@ -115,6 +115,7 @@ namespace Hop::System::Sound
}

ma_device_init(NULL, &config, &device);
deviceInUse = true;

ma_device_start(&device);
looping = true;
Expand Down Expand Up @@ -145,6 +146,7 @@ namespace Hop::System::Sound
bool looping = false;

DECODER decoderInUse = DECODER::NONE;
bool deviceInUse = false;

ma_decoding_backend_vtable* pCustomBackendVTables[1] =
{
Expand Down

0 comments on commit be3f75a

Please sign in to comment.