Skip to content

Commit

Permalink
Release 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
proconsule committed Sep 24, 2023
1 parent d35bcf4 commit 489e61e
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 34 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
- The network share syntax changed see README
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion source/UI/apppopups.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
11 changes: 6 additions & 5 deletions source/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}

}
Expand Down Expand Up @@ -955,6 +955,7 @@ namespace GUI {
if(GUI::wakeup == 1){
mpv_render_context_render(libmpv->getContext(), videoout->params);
glViewport(0, 0, static_cast<int>(io.DisplaySize.x), static_cast<int>(io.DisplaySize.y));
mpv_render_context_report_swap(libmpv->getContext());
GUI::wakeup = 0;
}
glClearColor(0.00f, 0.00f, 0.00f, 1.00f);
Expand Down
48 changes: 25 additions & 23 deletions source/libmpv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)){
Expand All @@ -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");
}


Expand Down Expand Up @@ -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;
}
}


Expand Down
4 changes: 2 additions & 2 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#define NDEBUG 1

//#define APPLETMODEENA 1
#define APPLETMODEENA 1


/* Exit from HB Menu instead fo returning
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 489e61e

Please sign in to comment.