diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b476a7..10a0d55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # NXMP Changelog -## [Unreleased 0.8.0] +## [0.8.1] + +### Fixed + +- Audio File playback crash fixed +- Fixed a typo error in popups + + +## [0.8.0] ### Added @@ -37,4 +45,4 @@ ### Release Info - Since the ini parser changed is recommended to start with a fresh ini -- The network share syntax changed see README \ No newline at end of file +- The network share syntax changed see README diff --git a/Makefile b/Makefile index ac1a5d4..f846c75 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ GITREV:= -D'GITREV="$(shell git rev-parse --short HEAD)"' VERSION_MAJOR := 0 VERSION_MINOR := 8 -VERSION_MICRO := 0 +VERSION_MICRO := 1 APP_TITLE := NXMP APP_AUTHOR := proconsule and darkxex diff --git a/source/UI/apppopups.cpp b/source/UI/apppopups.cpp index f70f304..9dd3079 100644 --- a/source/UI/apppopups.cpp +++ b/source/UI/apppopups.cpp @@ -551,6 +551,7 @@ namespace Popups{ playlist->appendFile(filebrowser->getCurrList()[item.fileHoveredidx],filebrowser->getOpenUrlPart()+filebrowser->getCurrList()[item.fileHoveredidx].path); item.popupstate = POPUP_STATE_NONE; } + } if (off > 0.0f) ImGui::SetCursorPosX(ImGui::GetCursorPosX() + off); @@ -599,7 +600,7 @@ namespace Popups{ if (off > 0.0f) ImGui::SetCursorPosX(ImGui::GetCursorPosX() + off); - if (ImGui::Button("Set as Startring element",button_size)) + if (ImGui::Button("Set as Starting element",button_size)) { playlist->setPlaylistIdx(item.playlistitemHighlighted); item.popupstate = POPUP_STATE_NONE; diff --git a/source/gui.cpp b/source/gui.cpp index 6775124..2fdb2de 100644 --- a/source/gui.cpp +++ b/source/gui.cpp @@ -480,6 +480,7 @@ namespace GUI { if (mp_event->event_id == MPV_EVENT_FILE_LOADED) { libmpv->getfileInfo(); item.state = MENU_STATE_PLAYER; + printf("LOADED\n"); if(libmpv->getFileInfo()->videos.size() == 0 || (libmpv->getFileInfo()->videos.size() == 1 && libmpv->getFileInfo()->videos[0].albumart) ){ item.playerstate = PLAYER_STATE_AUDIO; mpv_observe_property(libmpv->getHandle(), 0, "playback-time", MPV_FORMAT_DOUBLE); @@ -511,12 +512,11 @@ namespace GUI { } - - nxmpstats->decodingstats.videodecstats.codec = libmpv->getVideoCodec(); - + if(libmpv->getFileInfo()->videos.size() > 0){ + nxmpstats->decodingstats.videodecstats.codec = libmpv->getVideoCodec(); + } if(libmpv->getFileInfo()->audios.size() > 0){ - nxmpstats->decodingstats.audiodecstats.codec = libmpv->getAudioCodec(); - + nxmpstats->decodingstats.audiodecstats.codec = libmpv->getAudioCodec(); } } @@ -955,6 +955,7 @@ namespace GUI { if(GUI::wakeup == 1){ mpv_render_context_render(libmpv->getContext(), videoout->params); glViewport(0, 0, static_cast(io.DisplaySize.x), static_cast(io.DisplaySize.y)); + mpv_render_context_report_swap(libmpv->getContext()); GUI::wakeup = 0; } glClearColor(0.00f, 0.00f, 0.00f, 1.00f); diff --git a/source/libmpv.cpp b/source/libmpv.cpp index 51e2f2a..4c5b278 100644 --- a/source/libmpv.cpp +++ b/source/libmpv.cpp @@ -48,8 +48,8 @@ libMpv::libMpv(const std::string &configDir) { mpv_set_option_string(handle, "image-display-duration", "inf"); mpv_set_option_string(handle, "hdr-compute-peak", "no"); - mpv_set_option_string(handle, "demuxer-seekable-cache", "yes"); - mpv_set_option_string(handle, "demuxer-readahead-secs", std::to_string(configini->getDemuxCache(false)).c_str()); + //mpv_set_option_string(handle, "demuxer-seekable-cache", "yes"); + //mpv_set_option_string(handle, "demuxer-readahead-secs", std::to_string(configini->getDemuxCache(false)).c_str()); if(configini->getHWDec(false)){ @@ -59,10 +59,10 @@ libMpv::libMpv(const std::string &configDir) { } if(configini->getAout(false) == 0){ - mpv_set_option_string(handle, "aout", "sdl"); + mpv_set_option_string(handle, "ao", "sdl"); }else if(configini->getAout(false) == 1){ - mpv_set_option_string(handle, "aout", "hos"); + mpv_set_option_string(handle, "ao", "hos"); } @@ -817,25 +817,27 @@ void libMpv::clearShader(){ } void libMpv::resetFileInfo(){ - fileinfo->title = "Unknown"; - fileinfo->path = ""; - fileinfo->duration = 0; - fileinfo->resume = 0; - fileinfo->bit_rate = 0; - fileinfo->videos.clear(); - fileinfo->audios.clear(); - fileinfo->subtitles.clear(); - - fileinfo->chapters.clear(); - - fileinfo->playbackInfo.vid_id = -1; - fileinfo->playbackInfo.aud_id = -1; - fileinfo->playbackInfo.sub_id = -1; - fileinfo->playbackInfo.position = 0; - fileinfo->playbackInfo.duration = 0; - fileinfo->playbackInfo.title = ""; - fileinfo->playbackInfo.artist = ""; - fileinfo->playbackInfo.islive = false; + if(fileinfo!= NULL){ + fileinfo->title = "Unknown"; + fileinfo->path = ""; + fileinfo->duration = 0; + fileinfo->resume = 0; + fileinfo->bit_rate = 0; + fileinfo->videos.clear(); + fileinfo->audios.clear(); + fileinfo->subtitles.clear(); + + fileinfo->chapters.clear(); + + fileinfo->playbackInfo.vid_id = -1; + fileinfo->playbackInfo.aud_id = -1; + fileinfo->playbackInfo.sub_id = -1; + fileinfo->playbackInfo.position = 0; + fileinfo->playbackInfo.duration = 0; + fileinfo->playbackInfo.title = ""; + fileinfo->playbackInfo.artist = ""; + fileinfo->playbackInfo.islive = false; + } } diff --git a/source/main.cpp b/source/main.cpp index 23c87dc..689b4fd 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -46,7 +46,7 @@ #define NDEBUG 1 -//#define APPLETMODEENA 1 +#define APPLETMODEENA 1 /* Exit from HB Menu instead fo returning @@ -498,7 +498,7 @@ int main() { GUI::initMpv(); - libmpv->setDemuxCache(configini->getDemuxCache(false)); + //libmpv->setDemuxCache(configini->getDemuxCache(false)); int w, h; SDL_GetWindowSize(window, &w, &h);