mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-15 16:21:32 +00:00
libmgba: Fix build when disabled
This commit is contained in:
parent
f2e6cb4c29
commit
2836dd2b5e
@ -1,6 +1,8 @@
|
||||
// Copyright 2021 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
|
||||
#include "Core/HW/GBACore.h"
|
||||
|
||||
#define PYCPARSE // Remove static functions from the header
|
||||
@ -753,3 +755,4 @@ std::string Core::GetSavePath(std::string_view rom_path, int device_number)
|
||||
return save_path;
|
||||
}
|
||||
} // namespace HW::GBA
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
|
||||
#include <array>
|
||||
#include <condition_variable>
|
||||
#include <memory>
|
||||
@ -147,3 +149,4 @@ private:
|
||||
::Core::System& m_system;
|
||||
};
|
||||
} // namespace HW::GBA
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
// Copyright 2021 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
|
||||
#include "Core/HW/SI/SI_DeviceGBAEmu.h"
|
||||
|
||||
#include <vector>
|
||||
@ -174,3 +176,4 @@ void CSIDevice_GBAEmu::OnEvent(u64 userdata, s64 cycles_late)
|
||||
m_system.GetSerialInterface().ScheduleEvent(m_device_number, num_cycles);
|
||||
}
|
||||
} // namespace SerialInterface
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
@ -47,3 +49,4 @@ private:
|
||||
std::shared_ptr<GBAHostInterface> m_gbahost;
|
||||
};
|
||||
} // namespace SerialInterface
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
// Copyright 2021 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
|
||||
#include "DolphinQt/GBAHost.h"
|
||||
|
||||
#include <QApplication>
|
||||
@ -47,3 +49,4 @@ std::unique_ptr<GBAHostInterface> Host_CreateGBAHost(std::weak_ptr<HW::GBA::Core
|
||||
{
|
||||
return std::make_unique<GBAHost>(core);
|
||||
}
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Core/Host.h"
|
||||
@ -26,3 +28,4 @@ private:
|
||||
GBAWidgetController* m_widget_controller{};
|
||||
std::weak_ptr<HW::GBA::Core> m_core;
|
||||
};
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
// Copyright 2021 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
|
||||
#include "DolphinQt/GBAWidget.h"
|
||||
|
||||
#include <fmt/format.h>
|
||||
@ -615,3 +617,4 @@ void GBAWidgetController::FrameEnded(std::span<const u32> video_buffer)
|
||||
{
|
||||
m_widget->SetVideoBuffer(video_buffer);
|
||||
}
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
@ -112,3 +114,4 @@ public:
|
||||
private:
|
||||
GBAWidget* m_widget{};
|
||||
};
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
@ -665,6 +665,8 @@ void GameCubePane::SetAGPRom(ExpansionInterface::Slot slot, const QString& filen
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
|
||||
void GameCubePane::BrowseGBABios()
|
||||
{
|
||||
QString file = QDir::toNativeSeparators(DolphinFileDialog::getOpenFileName(
|
||||
@ -699,6 +701,8 @@ void GameCubePane::BrowseGBASaves()
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
void GameCubePane::LoadSettings()
|
||||
{
|
||||
bool have_menu = false;
|
||||
|
||||
@ -50,10 +50,13 @@ private:
|
||||
bool SetGCIFolder(ExpansionInterface::Slot slot, const QString& path);
|
||||
void BrowseAGPRom(ExpansionInterface::Slot slot);
|
||||
void SetAGPRom(ExpansionInterface::Slot slot, const QString& filename);
|
||||
|
||||
#ifdef HAS_LIBMGBA
|
||||
void BrowseGBABios();
|
||||
void BrowseGBARom(size_t index);
|
||||
void SaveRomPathChanged();
|
||||
void BrowseGBASaves();
|
||||
#endif // HAS_LIBMGBA
|
||||
|
||||
ConfigBool* m_skip_main_menu;
|
||||
ConfigChoice* m_language_combo;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user