mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-25 02:18:30 +01:00
Fixed issues hopefully
This commit is contained in:
parent
2779516378
commit
9bbc50ff3c
@ -35,7 +35,7 @@ namespace backend {
|
||||
int PollUnicodeChars();
|
||||
|
||||
void doPartialInit() {
|
||||
std::string root = core::args["root"];
|
||||
std::string root = (std::string)core::args["root"];
|
||||
backend::init();
|
||||
style::loadFonts(root + "/res"); // TODO: Don't hardcode, use config
|
||||
icons::load(root + "/res");
|
||||
|
@ -74,14 +74,14 @@ int sdrpp_main(int argc, char* argv[]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool serverMode = core::args["server"];
|
||||
bool serverMode = (bool)core::args["server"];
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!core::args["con"].b() && !serverMode) { FreeConsole(); }
|
||||
#endif
|
||||
|
||||
// Check root directory
|
||||
std::string root = core::args["root"];
|
||||
std::string root = (std::string)core::args["root"];
|
||||
if (!std::filesystem::exists(root)) {
|
||||
spdlog::warn("Root directory {0} does not exist, creating it", root);
|
||||
if (!std::filesystem::create_directories(root)) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
FileSelect::FileSelect(std::string defaultPath, std::vector<std::string> filter) {
|
||||
_filter = filter;
|
||||
root = core::args["root"];
|
||||
root = (std::string)core::args["root"];
|
||||
setPath(defaultPath);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <core.h>
|
||||
|
||||
FolderSelect::FolderSelect(std::string defaultPath) {
|
||||
root = core::args["root"];
|
||||
root = (std::string)core::args["root"];
|
||||
setPath(defaultPath);
|
||||
}
|
||||
|
||||
|
@ -148,8 +148,8 @@ namespace server {
|
||||
sigpath::sourceManager.selectSource(sourceList[sourceId]);
|
||||
|
||||
// TODO: Use command line option
|
||||
std::string host = core::args["addr"];
|
||||
int port = core::args["port"];
|
||||
std::string host = (std::string)core::args["addr"];
|
||||
int port = (int)core::args["port"];
|
||||
listener = net::listen(host, port);
|
||||
listener->acceptAsync(_clientHandler, NULL);
|
||||
|
||||
|
@ -243,7 +243,7 @@ private:
|
||||
|
||||
MOD_EXPORT void _INIT_() {
|
||||
// Create default recording directory
|
||||
std::string root = core::args["root"];
|
||||
std::string root = (std::string)core::args["root"];
|
||||
if (!std::filesystem::exists(root + "/recordings")) {
|
||||
spdlog::warn("Recordings directory does not exist, creating it");
|
||||
if (!std::filesystem::create_directory(root + "/recordings")) {
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
RecorderModule(std::string name) : folderSelect("%ROOT%/recordings") {
|
||||
this->name = name;
|
||||
|
||||
root = core::args["root"];
|
||||
root = (std::string)core::args["root"];
|
||||
|
||||
// Load config
|
||||
config.acquire();
|
||||
@ -518,7 +518,7 @@ struct RecorderContext_t {
|
||||
|
||||
MOD_EXPORT void _INIT_() {
|
||||
// Create default recording directory
|
||||
std::string root = core::args["root"];
|
||||
std::string root = (std::string)core::args["root"];
|
||||
if (!std::filesystem::exists(root + "/recordings")) {
|
||||
spdlog::warn("Recordings directory does not exist, creating it");
|
||||
if (!std::filesystem::create_directory(root + "/recordings")) {
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
RTLSDRSourceModule(std::string name) {
|
||||
this->name = name;
|
||||
|
||||
serverMode = core::args["server"];
|
||||
serverMode = (bool)core::args["server"];
|
||||
|
||||
sampleRate = sampleRates[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user