Skip to content

Commit

Permalink
fix: removed APIENTRY warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 committed Dec 1, 2024
1 parent e3f6f21 commit 8ab9adf
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 21 deletions.
8 changes: 4 additions & 4 deletions include/engine/utilities/file_management.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#pragma once

#ifdef _WIN32
#include <windows.h>
#endif

#include "video_manager.h"
#include "project_settings.h"

#include <glad/gl.h>

#ifdef _WIN32
#include <windows.h>
#endif

namespace utilities {

constexpr std::string_view hexwave_project_ext = ".hexw";
Expand Down
4 changes: 4 additions & 0 deletions include/engine/video_manager.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#pragma once

#ifdef _WIN32
#include <windows.h>
#endif

#include <vector>
#include <string_view>
#include <string>
Expand Down
37 changes: 24 additions & 13 deletions src/engine/project_settings.cpp
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
#include <fstream>
#include "project_settings.h"
#include "imgui.h"
#include "utilities/file_management.h"
#include "imgui.h"
#include "ImGuiNotify.hpp"

void project_settings::render_window() {
if(!show_window) {
if (!show_window) {
return;
}

if(ImGui::Begin("Project Settings")) {

if (ImGui::Begin("Project Settings")) {
static char start_vid_id[1024];
if(!start_id.empty())
if (!start_id.empty()) {
std::memcpy(start_vid_id, start_id.c_str(), start_id.length());
}

if(ImGui::InputText("Starting Video ID", start_vid_id, IM_ARRAYSIZE(start_vid_id))) {
start_id = start_vid_id;
}


static char button_texture_path[1024];
if(!normal_button_path.empty())
if (!normal_button_path.empty()) {
std::memcpy(button_texture_path, normal_button_path.c_str(), normal_button_path.length());
}

if(ImGui::InputText("Normal Button Texture Path", button_texture_path, IM_ARRAYSIZE(button_texture_path))) {
normal_button_path = button_texture_path;
}
Expand All @@ -41,13 +43,16 @@ void project_settings::render_window() {
}

static char hovered_button_texture_path[1024];
if(!hovered_button_path.empty())
if (!hovered_button_path.empty()) {
std::memcpy(hovered_button_texture_path, hovered_button_path.c_str(), hovered_button_path.length());
if(ImGui::InputText("Hovered Button Texture Path", hovered_button_texture_path, IM_ARRAYSIZE(hovered_button_texture_path))) {
}

if (ImGui::InputText("Hovered Button Texture Path", hovered_button_texture_path, IM_ARRAYSIZE(hovered_button_texture_path))) {
hovered_button_path = hovered_button_texture_path;
}

ImGui::SameLine();

if (ImGui::Button(std::string("Select Image##002").c_str())) {
std::string image_path{utilities::get_file_from_prompt(false, "Select Image", "Image File | *.png *.jpg", "PNG\0*.png\0JPEG\0*.jpg\0All\0*.*\0")};

Expand All @@ -61,13 +66,16 @@ void project_settings::render_window() {
}

static char selected_button_texture_path[1024];
if(!selected_button_path.empty())
if (!selected_button_path.empty()) {
std::memcpy(selected_button_texture_path, selected_button_path.c_str(), selected_button_path.length());
if(ImGui::InputText("Selected Button Texture Path", selected_button_texture_path, IM_ARRAYSIZE(selected_button_texture_path))) {
}

if (ImGui::InputText("Selected Button Texture Path", selected_button_texture_path, IM_ARRAYSIZE(selected_button_texture_path))) {
selected_button_path = selected_button_texture_path;
}

ImGui::SameLine();

if (ImGui::Button(std::string("Select Image##003").c_str())) {
std::string image_path{utilities::get_file_from_prompt(false, "Select Image", "Image File | *.png *.jpg", "PNG\0*.png\0JPEG\0*.jpg\0All\0*.*\0")};

Expand All @@ -81,13 +89,16 @@ void project_settings::render_window() {
}

static char button_pressed_sound[1024];
if(!button_sound_path.empty())
if (!button_sound_path.empty()) {
std::memcpy(button_pressed_sound, button_sound_path.c_str(), button_sound_path.length());
if(ImGui::InputText("Button Pressed Sound Path", button_pressed_sound, IM_ARRAYSIZE(button_pressed_sound))) {
}

if (ImGui::InputText("Button Pressed Sound Path", button_pressed_sound, IM_ARRAYSIZE(button_pressed_sound))) {
button_sound_path = button_pressed_sound;
}

ImGui::SameLine();

if (ImGui::Button(std::string("Select Sound").c_str())) {
std::string sound_path{utilities::get_file_from_prompt(false, "Select Sound", "Sound File | *.mp3 *.wav", "MP3\0*.mp3\0WAV\0*.wav\0All\0*.*\0")};

Expand Down
4 changes: 0 additions & 4 deletions src/engine/video_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
#include "imgui_internal.h"
#include "ImGuiNotify.hpp"

#ifdef _WIN32
#include <windows.h>
#endif

#if LIBAVFORMAT_VERSION_MAJOR < 59
#ifndef FFMPEG_LEGACY
#define FFMPEG_LEGACY
Expand Down

0 comments on commit 8ab9adf

Please sign in to comment.