mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-10 11:05:22 +02:00
Bandplan system
This commit is contained in:
16
src/main.cpp
16
src/main.cpp
@ -8,14 +8,15 @@
|
||||
#include <styles.h>
|
||||
#include <icons.h>
|
||||
#include <version.h>
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <bandplan.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
static void glfw_error_callback(int error, const char* description) {
|
||||
fprintf(stderr, "Glfw Error %d: %s\n", error, description);
|
||||
spdlog::error("Glfw Error {0}: {1}", error, description);
|
||||
}
|
||||
|
||||
int main() {
|
||||
@ -23,6 +24,8 @@ int main() {
|
||||
//FreeConsole();
|
||||
#endif
|
||||
|
||||
spdlog::info("SDR++ v" VERSION_STR);
|
||||
|
||||
// Setup window
|
||||
glfwSetErrorCallback(glfw_error_callback);
|
||||
if (!glfwInit()) {
|
||||
@ -42,7 +45,7 @@ int main() {
|
||||
glfwSwapInterval(1); // Enable vsync
|
||||
|
||||
if (glewInit() != GLEW_OK) {
|
||||
fprintf(stderr, "Failed to initialize OpenGL loader!\n");
|
||||
spdlog::error("Failed to initialize OpenGL loader!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -60,9 +63,14 @@ int main() {
|
||||
|
||||
windowInit();
|
||||
|
||||
printf("Loading icons...\n");
|
||||
spdlog::info("Loading icons");
|
||||
icons::load();
|
||||
|
||||
spdlog::info("Loading band plans");
|
||||
bandplan::loadFromDir("../bandplans");
|
||||
|
||||
spdlog::info("Ready.");
|
||||
|
||||
// Main loop
|
||||
while (!glfwWindowShouldClose(window)) {
|
||||
glfwPollEvents();
|
||||
|
Reference in New Issue
Block a user