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