Skip to content

Commit

Permalink
v 0.4.0
Browse files Browse the repository at this point in the history
- added Auto Audio Language Selection
- added Image Controls
- added Audio Controls
- changed USB device list aspect
- fixed empty folder crash
  • Loading branch information
proconsule committed Nov 2, 2021
1 parent 40a4160 commit fb55467
Show file tree
Hide file tree
Showing 31 changed files with 2,025 additions and 1,228 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ include $(DEVKITPRO)/libnx/switch_rules
#---------------------------------------------------------------------------------
TARGET := $(notdir $(CURDIR))
BUILD := build
SOURCES := libs/imgui libs/imgui/misc/freetype source source/UI source/remotefs/Enigma2 source/localfs/usb source/remotefs/ftplib source/remotefs/HTTPDir
SOURCES := libs/imgui libs/imgui/misc/freetype source source/UI source/remotefs/Enigma2 source/localfs source/localfs/usb source/remotefs/ftplib source/remotefs/HTTPDir
DATA := data
INCLUDES := libs/simpleini libs/imgui include source/remotefs/Enigma2 source/localfs/usb source/remotefs/ftplib source/remotefs/HTTPDir
INCLUDES := libs/simpleini libs/imgui include source/remotefs/Enigma2 source/localfs source/localfs/usb source/remotefs/ftplib source/remotefs/HTTPDir
ROMFS := romfs

VERSION_MAJOR := 0
VERSION_MINOR := 3
VERSION_MINOR := 4
VERSION_MICRO := 0

APP_TITLE := NXMP
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Buttons Mapping
- R Stick Button Toggle Masterlock (during playback, only A button will work)
- Dpad Right (during playback show right menu)
- Dpad Left (during playback close right menu)

- R Stick Up/Down Fast Scroll on file list

FAQ
-----
Expand Down
40 changes: 20 additions & 20 deletions include/apppopups.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#ifndef NXMP_APPPOPUPS_H
#define NXMP_APPPOPUPS_H

#include "imgui.h"

namespace Popups {
inline void SetupPopup(const char *id) {
ImGui::OpenPopup(id);
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(15, 15));
ImGui::SetNextWindowPos(ImVec2(640.0f, 360.0f), ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
};

inline void ExitPopup(void) {
ImGui::EndPopup();
ImGui::PopStyleVar();
};

void SaveSettingsPopup(void);
}

#ifndef NXMP_APPPOPUPS_H
#define NXMP_APPPOPUPS_H

#include "imgui.h"

namespace Popups {
inline void SetupPopup(const char *id) {
ImGui::OpenPopup(id);
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(15, 15));
ImGui::SetNextWindowPos(ImVec2(640.0f, 360.0f), ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
};

inline void ExitPopup(void) {
ImGui::EndPopup();
ImGui::PopStyleVar();
};

void SaveSettingsPopup(void);
}

#endif
4 changes: 3 additions & 1 deletion include/appwindows.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ namespace Windows {
ImGui::PopStyleVar();
};

void FileBrowserWindow(bool *focus, bool *first_item);
void FileBrowserWindow(bool *focus, bool first_item);
void USBBrowserWindow(bool *focus, bool *first_item);
void EnigmaWindow(bool *focus, bool *first_item);
void MainMenuWindow(bool *focus, bool *first_item);
void FtpWindow(bool *focus, bool *first_item);
void HttpWindow(bool *focus, bool *first_item);
void NetworkWindow(bool *focus, bool *first_item);
void InfoMenuWindow(bool *focus, bool *first_item);
void VideoWindow(bool *focus, bool *first_item);
Expand Down
93 changes: 52 additions & 41 deletions include/config.h
Original file line number Diff line number Diff line change
@@ -1,42 +1,53 @@
#ifndef NXMP_CONFIG_H
#define NXMP_CONFIG_H

#include <string>
#include <vector>
#include "SimpleIni.h"

struct networkSource{
std::string name;
std::string url;
};

class Config{
public:
Config(std::string inifile);
std::vector<networkSource> getNetworks();
std::string getEnigma();
std::string getStartPath();

int getLongSeek(bool tmpvalue);
int getShortSeek(bool tmpvalue);

void setLongSeek(int seektime);
void setShortSeek(int seektime);

void saveSettings();

std::vector<std::string> topmenu;
CSimpleIniA *ini;

private:
int shortseek;
int longseek;

int tmpshortseek;
int tmplongseek;

std::string inifilePath;
};


#ifndef NXMP_CONFIG_H
#define NXMP_CONFIG_H

#include <string>
#include <vector>
#include "SimpleIni.h"

struct networkSource{
std::string name;
std::string url;
};

class Config{
public:
Config(std::string inifile);
std::vector<networkSource> getNetworks();
std::string getEnigma();
std::string getStartPath();

int getLongSeek(bool tmpvalue);
int getShortSeek(bool tmpvalue);

void setLongSeek(int seektime);
void setShortSeek(int seektime);

bool getUseAlang(bool tmpvalue);
void setUseAlang(bool _val);
int getAlang(bool tmpvalue);
void setAlang(int lang);

void saveSettings();

std::vector<std::string> topmenu;
CSimpleIniA *ini;

private:
int shortseek;
int longseek;

int tmpshortseek;
int tmplongseek;

bool tmpusealang;
bool usealang;

int tmpalang;
int alang;

std::string inifilePath;
};


#endif
21 changes: 11 additions & 10 deletions include/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "localfiles.h"
#include "SimpleIni.h"
#include "remotefs.h"
#include "localFs.h"
#include "utils.h"
#include "usbfs.h"
#include "Enigma2.h"
Expand All @@ -28,11 +29,14 @@ enum MENU_STATES {
MENU_STATE_FILEBROWSER,
MENU_STATE_USB,
MENU_STATE_NETWORKBROWSER,
MENU_STATE_FTPBROWSER,
MENU_STATE_HTTPBROWSER,
MENU_STATE_ENIGMABROWSER,
MENU_STATE_INFO,
// MENU_STATE_OPTIONS,
MENU_STATE_SETTINGS,
MENU_STATE_PLAYER
MENU_STATE_PLAYER,
MENU_STATE_PLAYERCACHING
};

enum APP_POPUP_STATES {
Expand All @@ -49,7 +53,9 @@ enum PLAYER_RIGHT_MENU_STATES {
PLAYER_RIGHT_MENU_TRACKS_SUB,
PLAYER_RIGHT_MENU_CHAPTERS,
PLAYER_RIGHT_MENU_ARATIO,
PLAYER_RIGHT_MENU_CUSTOMARATIO
PLAYER_RIGHT_MENU_CUSTOMARATIO,
PLAYER_RIGHT_MENU_IMAGE,
PLAYER_RIGHT_MENU_AUDIO
};


Expand All @@ -59,15 +65,12 @@ typedef struct {
PLAYER_RIGHT_MENU_STATES rightmenustate = PLAYER_RIGHT_MENU_PLAYER;
APP_POPUP_STATES popupstate = POPUP_STATE_NONE;
int selected = 0;
std::string localpath = "/switch/nxmp";
std::vector<FS::FileEntry> localfileentries;
std::string usbpath = "";
std::string usbbasepath = "";
std::vector<FS::FileEntry> usbfileentries;

std::vector<networkSource> networksources;
std::string networkurl;
std::string networklastpath;
std::vector<FS::FileEntry> networkentries;


bool networkselect = true;
int playershowcontrols = false;
Expand All @@ -88,6 +91,7 @@ extern SDL_Window *window;
extern MenuItem item;

extern libMpv *libmpv;
extern localFs *localdir;
extern HTTPDir *httpdir;
extern FTPDir *ftpdir;
#ifdef __SWITCH__
Expand Down Expand Up @@ -130,9 +134,6 @@ extern Tex ExitTexture;

extern ImFont* fontSmall;




namespace GUI {

void initMpv();
Expand Down
Loading

0 comments on commit fb55467

Please sign in to comment.