mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
Compile for Windows
This commit is contained in:
parent
c308aa817c
commit
99e60d2c82
@ -566,12 +566,6 @@ const Info<bool> MAIN_EMULATE_SKYLANDER_PORTAL{
|
|||||||
const Info<bool> MAIN_EMULATE_INFINITY_BASE{
|
const Info<bool> MAIN_EMULATE_INFINITY_BASE{
|
||||||
{System::Main, "EmulatedUSBDevices", "EmulateInfinityBase"}, false};
|
{System::Main, "EmulatedUSBDevices", "EmulateInfinityBase"}, false};
|
||||||
|
|
||||||
const Info<bool> MAIN_EMULATE_WII_SPEAK{{System::Main, "EmulatedUSBDevices", "EmulateWiiSpeak"},
|
|
||||||
false};
|
|
||||||
|
|
||||||
const Info<std::string> MAIN_WII_SPEAK_MICROPHONE{{System::Main, "General", "WiiSpeakMicrophone"},
|
|
||||||
""};
|
|
||||||
|
|
||||||
// The reason we need this function is because some memory card code
|
// The reason we need this function is because some memory card code
|
||||||
// expects to get a non-NTSC-K region even if we're emulating an NTSC-K Wii.
|
// expects to get a non-NTSC-K region even if we're emulating an NTSC-K Wii.
|
||||||
DiscIO::Region ToGameCubeRegion(DiscIO::Region region)
|
DiscIO::Region ToGameCubeRegion(DiscIO::Region region)
|
||||||
|
@ -351,8 +351,6 @@ void SetUSBDeviceWhitelist(const std::set<std::pair<u16, u16>>& devices);
|
|||||||
|
|
||||||
extern const Info<bool> MAIN_EMULATE_SKYLANDER_PORTAL;
|
extern const Info<bool> MAIN_EMULATE_SKYLANDER_PORTAL;
|
||||||
extern const Info<bool> MAIN_EMULATE_INFINITY_BASE;
|
extern const Info<bool> MAIN_EMULATE_INFINITY_BASE;
|
||||||
extern const Info<bool> MAIN_EMULATE_WII_SPEAK;
|
|
||||||
extern const Info<std::string> MAIN_WII_SPEAK_MICROPHONE;
|
|
||||||
|
|
||||||
// GameCube path utility functions
|
// GameCube path utility functions
|
||||||
|
|
||||||
|
@ -1,25 +1,31 @@
|
|||||||
//
|
// Copyright 2024 Dolphin Emulator Project
|
||||||
// Created by Noah Pistilli on 2023-07-09.
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
//
|
|
||||||
|
|
||||||
#include <cubeb/cubeb.h>
|
#include <cubeb/cubeb.h>
|
||||||
|
|
||||||
#include "AudioCommon/CubebUtils.h"
|
#include "AudioCommon/CubebUtils.h"
|
||||||
#include <Common/Logging/Log.h>
|
#include "Common/Logging/Log.h"
|
||||||
|
|
||||||
#include "Microphone.h"
|
#include "Common/ScopeGuard.h"
|
||||||
#include "Common/Swap.h"
|
#include "Common/Swap.h"
|
||||||
|
#include "Core/IOS/USB/Emulated/Microphone.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <Objbase.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace IOS::HLE::USB
|
namespace IOS::HLE::USB
|
||||||
{
|
{
|
||||||
Microphone::Microphone() {
|
Microphone::Microphone()
|
||||||
|
{
|
||||||
StreamInit();
|
StreamInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
Microphone::~Microphone() {
|
Microphone::~Microphone()
|
||||||
|
{
|
||||||
StreamTerminate();
|
StreamTerminate();
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -110,8 +116,8 @@ void Microphone::StreamStart()
|
|||||||
|
|
||||||
if (cubeb_stream_init(m_cubeb_ctx.get(), &m_cubeb_stream,
|
if (cubeb_stream_init(m_cubeb_ctx.get(), &m_cubeb_stream,
|
||||||
"Dolphin Emulated GameCube Microphone", nullptr, ¶ms, nullptr,
|
"Dolphin Emulated GameCube Microphone", nullptr, ¶ms, nullptr,
|
||||||
nullptr, std::max<u32>(16, minimum_latency), DataCallback,
|
nullptr, std::max<u32>(16, minimum_latency), DataCallback, state_callback,
|
||||||
state_callback, this) != CUBEB_OK)
|
this) != CUBEB_OK)
|
||||||
{
|
{
|
||||||
ERROR_LOG_FMT(IOS_USB, "Error initializing cubeb stream");
|
ERROR_LOG_FMT(IOS_USB, "Error initializing cubeb stream");
|
||||||
return;
|
return;
|
||||||
@ -173,44 +179,6 @@ long Microphone::DataCallback(cubeb_stream* stream, void* user_data, const void*
|
|||||||
return nframes;
|
return nframes;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Microphone::PerformAudioCapture()
|
|
||||||
{
|
|
||||||
/*m_num_of_samples = BUFFER_SIZE / 2;
|
|
||||||
|
|
||||||
ALCint samples_in{};
|
|
||||||
alcGetIntegerv(m_device, ALC_CAPTURE_SAMPLES, 1, &samples_in);
|
|
||||||
m_num_of_samples = std::min(m_num_of_samples, static_cast<u32>(samples_in));
|
|
||||||
|
|
||||||
if (m_num_of_samples == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
alcCaptureSamples(m_device, m_dsp_data.data(), m_num_of_samples);*/
|
|
||||||
}
|
|
||||||
|
|
||||||
void Microphone::ByteSwap(const void* src, void* dst) const
|
|
||||||
{
|
|
||||||
*static_cast<u16*>(dst) = Common::swap16(*static_cast<const u16*>(src));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Microphone::GetSoundData()
|
|
||||||
{
|
|
||||||
/*if (m_num_of_samples == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
u8* ptr = const_cast<u8*>(m_temp_buffer.data());
|
|
||||||
// Convert LE to BE
|
|
||||||
for (u32 i = 0; i < m_num_of_samples; i++)
|
|
||||||
{
|
|
||||||
for (u32 indchan = 0; indchan < 1; indchan++)
|
|
||||||
{
|
|
||||||
const u32 curindex = (i * 2) + indchan * (16 / 8);
|
|
||||||
ByteSwap(m_dsp_data.data() + curindex, ptr + curindex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_rbuf_dsp.write_bytes(ptr, m_num_of_samples * 2);*/
|
|
||||||
}
|
|
||||||
|
|
||||||
void Microphone::ReadIntoBuffer(u8* dst, u32 size)
|
void Microphone::ReadIntoBuffer(u8* dst, u32 size)
|
||||||
{
|
{
|
||||||
std::lock_guard lk(ring_lock);
|
std::lock_guard lk(ring_lock);
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
|
// Copyright 2024 Dolphin Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <OpenAL/al.h>
|
#include <mutex>
|
||||||
#include <OpenAL/alc.h>
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <mutex>
|
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
#include "Common/Event.h"
|
||||||
|
#include "Common/WorkQueueThread.h"
|
||||||
|
|
||||||
struct cubeb;
|
struct cubeb;
|
||||||
struct cubeb_stream;
|
struct cubeb_stream;
|
||||||
@ -22,8 +24,6 @@ public:
|
|||||||
|
|
||||||
void StreamInit();
|
void StreamInit();
|
||||||
void StreamTerminate();
|
void StreamTerminate();
|
||||||
void PerformAudioCapture();
|
|
||||||
void GetSoundData();
|
|
||||||
void ReadIntoBuffer(u8* dst, u32 size);
|
void ReadIntoBuffer(u8* dst, u32 size);
|
||||||
bool HasData() const;
|
bool HasData() const;
|
||||||
|
|
||||||
@ -33,7 +33,6 @@ private:
|
|||||||
|
|
||||||
void StreamStart();
|
void StreamStart();
|
||||||
void StopStream();
|
void StopStream();
|
||||||
void ByteSwap(const void* src, void* dst) const;
|
|
||||||
|
|
||||||
static constexpr u32 SAMPLING_RATE = 8000;
|
static constexpr u32 SAMPLING_RATE = 8000;
|
||||||
static constexpr u32 BUFFER_SIZE = SAMPLING_RATE / 2;
|
static constexpr u32 BUFFER_SIZE = SAMPLING_RATE / 2;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Dolphin Emulator Project
|
// Copyright 2024 Dolphin Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "Core/IOS/USB/Emulated/WiiSpeak.h"
|
#include "Core/IOS/USB/Emulated/WiiSpeak.h"
|
||||||
@ -26,11 +26,6 @@ WiiSpeak::WiiSpeak(IOS::HLE::EmulationKernel& ios, const std::string& device_nam
|
|||||||
m_microphone = std::make_unique<Microphone>();
|
m_microphone = std::make_unique<Microphone>();
|
||||||
}
|
}
|
||||||
|
|
||||||
WiiSpeak::~WiiSpeak()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceDescriptor WiiSpeak::GetDeviceDescriptor() const
|
DeviceDescriptor WiiSpeak::GetDeviceDescriptor() const
|
||||||
{
|
{
|
||||||
return m_device_descriptor;
|
return m_device_descriptor;
|
||||||
@ -106,9 +101,6 @@ int WiiSpeak::SubmitTransfer(std::unique_ptr<CtrlMessage> cmd)
|
|||||||
m_vid, m_pid, m_active_interface, cmd->request_type, cmd->request, cmd->value,
|
m_vid, m_pid, m_active_interface, cmd->request_type, cmd->request, cmd->value,
|
||||||
cmd->index, cmd->length);
|
cmd->index, cmd->length);
|
||||||
|
|
||||||
if (!b_is_mic_connected)
|
|
||||||
return IPC_ENOENT;
|
|
||||||
|
|
||||||
switch (cmd->request_type << 8 | cmd->request)
|
switch (cmd->request_type << 8 | cmd->request)
|
||||||
{
|
{
|
||||||
case USBHDR(DIR_DEVICE2HOST, TYPE_STANDARD, REC_INTERFACE, REQUEST_GET_INTERFACE):
|
case USBHDR(DIR_DEVICE2HOST, TYPE_STANDARD, REC_INTERFACE, REQUEST_GET_INTERFACE):
|
||||||
@ -176,8 +168,7 @@ int WiiSpeak::SubmitTransfer(std::unique_ptr<IsoMessage> cmd)
|
|||||||
if (cmd->endpoint == 0x81 && m_microphone->HasData())
|
if (cmd->endpoint == 0x81 && m_microphone->HasData())
|
||||||
m_microphone->ReadIntoBuffer(packets, cmd->length);
|
m_microphone->ReadIntoBuffer(packets, cmd->length);
|
||||||
|
|
||||||
// Anything more causes the visual cue to not appear.
|
// TODO: Figure out proper timings.
|
||||||
// Anything less is more choppy audio.
|
|
||||||
cmd->ScheduleTransferCompletion(IPC_SUCCESS, 2500);
|
cmd->ScheduleTransferCompletion(IPC_SUCCESS, 2500);
|
||||||
return IPC_SUCCESS;
|
return IPC_SUCCESS;
|
||||||
};
|
};
|
||||||
@ -199,6 +190,7 @@ void WiiSpeak::SetRegister(std::unique_ptr<CtrlMessage>& cmd)
|
|||||||
switch (arg1)
|
switch (arg1)
|
||||||
{
|
{
|
||||||
case FREQ_8KHZ:
|
case FREQ_8KHZ:
|
||||||
|
// TODO: I have never seen it not be 8000 kHz
|
||||||
sampler.freq = 8000;
|
sampler.freq = 8000;
|
||||||
break;
|
break;
|
||||||
case FREQ_11KHZ:
|
case FREQ_11KHZ:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Dolphin Emulator Project
|
// Copyright 2024 Dolphin Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -19,7 +19,6 @@ class WiiSpeak final : public Device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WiiSpeak(EmulationKernel& ios, const std::string& device_name);
|
WiiSpeak(EmulationKernel& ios, const std::string& device_name);
|
||||||
~WiiSpeak();
|
|
||||||
DeviceDescriptor GetDeviceDescriptor() const override;
|
DeviceDescriptor GetDeviceDescriptor() const override;
|
||||||
std::vector<ConfigDescriptor> GetConfigurations() const override;
|
std::vector<ConfigDescriptor> GetConfigurations() const override;
|
||||||
std::vector<InterfaceDescriptor> GetInterfaces(u8 config) const override;
|
std::vector<InterfaceDescriptor> GetInterfaces(u8 config) const override;
|
||||||
@ -57,13 +56,13 @@ private:
|
|||||||
FREQ_8KHZ = 0,
|
FREQ_8KHZ = 0,
|
||||||
FREQ_11KHZ = 1,
|
FREQ_11KHZ = 1,
|
||||||
FREQ_RESERVED = 2,
|
FREQ_RESERVED = 2,
|
||||||
FREQ_16KHZ = 3, // default
|
FREQ_16KHZ = 3,
|
||||||
|
|
||||||
SAMPLER_GAIN = 4,
|
SAMPLER_GAIN = 4,
|
||||||
GAIN_00dB = 0,
|
GAIN_00dB = 0,
|
||||||
GAIN_15dB = 1,
|
GAIN_15dB = 1,
|
||||||
GAIN_30dB = 2,
|
GAIN_30dB = 2,
|
||||||
GAIN_36dB = 3, // default
|
GAIN_36dB = 3,
|
||||||
|
|
||||||
EC_STATE = 0x14,
|
EC_STATE = 0x14,
|
||||||
|
|
||||||
@ -83,7 +82,6 @@ private:
|
|||||||
u8 m_active_interface = 0;
|
u8 m_active_interface = 0;
|
||||||
bool m_device_attached = false;
|
bool m_device_attached = false;
|
||||||
bool init = false;
|
bool init = false;
|
||||||
bool b_is_mic_connected = true;
|
|
||||||
std::unique_ptr<Microphone> m_microphone;
|
std::unique_ptr<Microphone> m_microphone;
|
||||||
DeviceDescriptor m_device_descriptor{};
|
DeviceDescriptor m_device_descriptor{};
|
||||||
std::vector<ConfigDescriptor> m_config_descriptor;
|
std::vector<ConfigDescriptor> m_config_descriptor;
|
||||||
|
@ -395,9 +395,11 @@
|
|||||||
<ClInclude Include="Core\IOS\USB\Bluetooth\WiimoteHIDAttr.h" />
|
<ClInclude Include="Core\IOS\USB\Bluetooth\WiimoteHIDAttr.h" />
|
||||||
<ClInclude Include="Core\IOS\USB\Common.h" />
|
<ClInclude Include="Core\IOS\USB\Common.h" />
|
||||||
<ClInclude Include="Core\IOS\USB\Emulated\Infinity.h" />
|
<ClInclude Include="Core\IOS\USB\Emulated\Infinity.h" />
|
||||||
|
<ClInclude Include="Core\IOS\USB\Emulated\Microphone.h" />
|
||||||
<ClInclude Include="Core\IOS\USB\Emulated\Skylanders\Skylander.h" />
|
<ClInclude Include="Core\IOS\USB\Emulated\Skylanders\Skylander.h" />
|
||||||
<ClInclude Include="Core\IOS\USB\Emulated\Skylanders\SkylanderCrypto.h" />
|
<ClInclude Include="Core\IOS\USB\Emulated\Skylanders\SkylanderCrypto.h" />
|
||||||
<ClInclude Include="Core\IOS\USB\Emulated\Skylanders\SkylanderFigure.h" />
|
<ClInclude Include="Core\IOS\USB\Emulated\Skylanders\SkylanderFigure.h" />
|
||||||
|
<ClInclude Include="Core\IOS\USB\Emulated\WiiSpeak.h" />
|
||||||
<ClInclude Include="Core\IOS\USB\Host.h" />
|
<ClInclude Include="Core\IOS\USB\Host.h" />
|
||||||
<ClInclude Include="Core\IOS\USB\LibusbDevice.h" />
|
<ClInclude Include="Core\IOS\USB\LibusbDevice.h" />
|
||||||
<ClInclude Include="Core\IOS\USB\OH0\OH0.h" />
|
<ClInclude Include="Core\IOS\USB\OH0\OH0.h" />
|
||||||
@ -1051,9 +1053,11 @@
|
|||||||
<ClCompile Include="Core\IOS\USB\Bluetooth\WiimoteHIDAttr.cpp" />
|
<ClCompile Include="Core\IOS\USB\Bluetooth\WiimoteHIDAttr.cpp" />
|
||||||
<ClCompile Include="Core\IOS\USB\Common.cpp" />
|
<ClCompile Include="Core\IOS\USB\Common.cpp" />
|
||||||
<ClCompile Include="Core\IOS\USB\Emulated\Infinity.cpp" />
|
<ClCompile Include="Core\IOS\USB\Emulated\Infinity.cpp" />
|
||||||
|
<ClCompile Include="Core\IOS\USB\Emulated\Microphone.cpp" />
|
||||||
<ClCompile Include="Core\IOS\USB\Emulated\Skylanders\Skylander.cpp" />
|
<ClCompile Include="Core\IOS\USB\Emulated\Skylanders\Skylander.cpp" />
|
||||||
<ClCompile Include="Core\IOS\USB\Emulated\Skylanders\SkylanderCrypto.cpp" />
|
<ClCompile Include="Core\IOS\USB\Emulated\Skylanders\SkylanderCrypto.cpp" />
|
||||||
<ClCompile Include="Core\IOS\USB\Emulated\Skylanders\SkylanderFigure.cpp" />
|
<ClCompile Include="Core\IOS\USB\Emulated\Skylanders\SkylanderFigure.cpp" />
|
||||||
|
<ClCompile Include="Core\IOS\USB\Emulated\WiiSpeak.cpp" />
|
||||||
<ClCompile Include="Core\IOS\USB\Host.cpp" />
|
<ClCompile Include="Core\IOS\USB\Host.cpp" />
|
||||||
<ClCompile Include="Core\IOS\USB\LibusbDevice.cpp" />
|
<ClCompile Include="Core\IOS\USB\LibusbDevice.cpp" />
|
||||||
<ClCompile Include="Core\IOS\USB\OH0\OH0.cpp" />
|
<ClCompile Include="Core\IOS\USB\OH0\OH0.cpp" />
|
||||||
|
@ -240,8 +240,6 @@ add_executable(dolphin-emu
|
|||||||
DiscordHandler.h
|
DiscordHandler.h
|
||||||
DiscordJoinRequestDialog.cpp
|
DiscordJoinRequestDialog.cpp
|
||||||
DiscordJoinRequestDialog.h
|
DiscordJoinRequestDialog.h
|
||||||
EmulatedUSB/WiiSpeakWindow.cpp
|
|
||||||
EmulatedUSB/WiiSpeakWindow.h
|
|
||||||
FIFO/FIFOAnalyzer.cpp
|
FIFO/FIFOAnalyzer.cpp
|
||||||
FIFO/FIFOAnalyzer.h
|
FIFO/FIFOAnalyzer.h
|
||||||
FIFO/FIFOPlayerWindow.cpp
|
FIFO/FIFOPlayerWindow.cpp
|
||||||
|
@ -1,77 +0,0 @@
|
|||||||
// Copyright 2023 Dolphin Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#include "DolphinQt/EmulatedUSB/WiiSpeakWindow.h"
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include <QCheckBox>
|
|
||||||
#include <QComboBox>
|
|
||||||
#include <QCompleter>
|
|
||||||
#include <QDialogButtonBox>
|
|
||||||
#include <QGroupBox>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QLineEdit>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QPushButton>
|
|
||||||
#include <QScrollArea>
|
|
||||||
#include <QString>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
|
|
||||||
#include "Common/IOFile.h"
|
|
||||||
|
|
||||||
#include "Core/Config/MainSettings.h"
|
|
||||||
#include "Core/Core.h"
|
|
||||||
#include "Core/IOS/USB/Emulated/Microphone.h"
|
|
||||||
#include "Core/System.h"
|
|
||||||
|
|
||||||
#include "DolphinQt/QtUtils/DolphinFileDialog.h"
|
|
||||||
#include "DolphinQt/Settings.h"
|
|
||||||
|
|
||||||
WiiSpeakWindow::WiiSpeakWindow(QWidget* parent) : QWidget(parent)
|
|
||||||
{
|
|
||||||
setWindowTitle(tr("Wii Speak Manager"));
|
|
||||||
setObjectName(QStringLiteral("wii_speak_manager"));
|
|
||||||
setMinimumSize(QSize(700, 200));
|
|
||||||
|
|
||||||
CreateMainWindow();
|
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
|
||||||
&WiiSpeakWindow::OnEmulationStateChanged);
|
|
||||||
|
|
||||||
installEventFilter(this);
|
|
||||||
|
|
||||||
OnEmulationStateChanged(Core::GetState());
|
|
||||||
};
|
|
||||||
|
|
||||||
WiiSpeakWindow::~WiiSpeakWindow() = default;
|
|
||||||
|
|
||||||
void WiiSpeakWindow::CreateMainWindow()
|
|
||||||
{
|
|
||||||
auto* main_layout = new QVBoxLayout();
|
|
||||||
|
|
||||||
auto* checkbox_group = new QGroupBox();
|
|
||||||
auto* checkbox_layout = new QHBoxLayout();
|
|
||||||
checkbox_layout->setAlignment(Qt::AlignLeft);
|
|
||||||
m_checkbox = new QCheckBox(tr("Emulate Wii Speak"), this);
|
|
||||||
m_checkbox->setChecked(Config::Get(Config::MAIN_EMULATE_WII_SPEAK));
|
|
||||||
connect(m_checkbox, &QCheckBox::toggled, this, &WiiSpeakWindow::EmulateWiiSpeak);
|
|
||||||
checkbox_layout->addWidget(m_checkbox);
|
|
||||||
checkbox_group->setLayout(checkbox_layout);
|
|
||||||
|
|
||||||
|
|
||||||
main_layout->addWidget(checkbox_group);
|
|
||||||
setLayout(main_layout);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WiiSpeakWindow::EmulateWiiSpeak(bool emulate)
|
|
||||||
{
|
|
||||||
Config::SetBaseOrCurrent(Config::MAIN_EMULATE_WII_SPEAK, emulate);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WiiSpeakWindow::OnEmulationStateChanged(Core::State state)
|
|
||||||
{
|
|
||||||
const bool running = state != Core::State::Uninitialized;
|
|
||||||
|
|
||||||
m_checkbox->setEnabled(!running);
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
// Copyright 2023 Dolphin Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <array>
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
|
||||||
#include "Core/Core.h"
|
|
||||||
|
|
||||||
class QCheckBox;
|
|
||||||
class QGroupBox;
|
|
||||||
class QLineEdit;
|
|
||||||
class QVBoxLayout;
|
|
||||||
class QComboBox;
|
|
||||||
|
|
||||||
class WiiSpeakWindow : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit WiiSpeakWindow(QWidget* parent = nullptr);
|
|
||||||
~WiiSpeakWindow() override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
void CreateMainWindow();
|
|
||||||
void OnEmulationStateChanged(Core::State state);
|
|
||||||
void EmulateWiiSpeak(bool emulate);
|
|
||||||
|
|
||||||
QCheckBox* m_checkbox;
|
|
||||||
};
|
|
@ -92,7 +92,6 @@
|
|||||||
#include "DolphinQt/Debugger/ThreadWidget.h"
|
#include "DolphinQt/Debugger/ThreadWidget.h"
|
||||||
#include "DolphinQt/Debugger/WatchWidget.h"
|
#include "DolphinQt/Debugger/WatchWidget.h"
|
||||||
#include "DolphinQt/DiscordHandler.h"
|
#include "DolphinQt/DiscordHandler.h"
|
||||||
#include "DolphinQt/EmulatedUSB/WiiSpeakWindow.h"
|
|
||||||
#include "DolphinQt/FIFO/FIFOPlayerWindow.h"
|
#include "DolphinQt/FIFO/FIFOPlayerWindow.h"
|
||||||
#include "DolphinQt/GCMemcardManager.h"
|
#include "DolphinQt/GCMemcardManager.h"
|
||||||
#include "DolphinQt/GameList/GameList.h"
|
#include "DolphinQt/GameList/GameList.h"
|
||||||
@ -559,7 +558,6 @@ void MainWindow::ConnectMenuBar()
|
|||||||
connect(m_menu_bar, &MenuBar::ShowFIFOPlayer, this, &MainWindow::ShowFIFOPlayer);
|
connect(m_menu_bar, &MenuBar::ShowFIFOPlayer, this, &MainWindow::ShowFIFOPlayer);
|
||||||
connect(m_menu_bar, &MenuBar::ShowSkylanderPortal, this, &MainWindow::ShowSkylanderPortal);
|
connect(m_menu_bar, &MenuBar::ShowSkylanderPortal, this, &MainWindow::ShowSkylanderPortal);
|
||||||
connect(m_menu_bar, &MenuBar::ShowInfinityBase, this, &MainWindow::ShowInfinityBase);
|
connect(m_menu_bar, &MenuBar::ShowInfinityBase, this, &MainWindow::ShowInfinityBase);
|
||||||
connect(m_menu_bar, &MenuBar::ShowWiiSpeakWindow, this, &MainWindow::ShowWiiSpeakWindow);
|
|
||||||
connect(m_menu_bar, &MenuBar::ConnectWiiRemote, this, &MainWindow::OnConnectWiiRemote);
|
connect(m_menu_bar, &MenuBar::ConnectWiiRemote, this, &MainWindow::OnConnectWiiRemote);
|
||||||
|
|
||||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||||
@ -1404,18 +1402,6 @@ void MainWindow::ShowInfinityBase()
|
|||||||
m_infinity_window->activateWindow();
|
m_infinity_window->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::ShowWiiSpeakWindow()
|
|
||||||
{
|
|
||||||
if (!m_wii_speak_window)
|
|
||||||
{
|
|
||||||
m_wii_speak_window = new WiiSpeakWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_wii_speak_window->show();
|
|
||||||
m_wii_speak_window->raise();
|
|
||||||
m_wii_speak_window->activateWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::StateLoad()
|
void MainWindow::StateLoad()
|
||||||
{
|
{
|
||||||
QString path =
|
QString path =
|
||||||
|
@ -52,7 +52,6 @@ class ThreadWidget;
|
|||||||
class ToolBar;
|
class ToolBar;
|
||||||
class WatchWidget;
|
class WatchWidget;
|
||||||
class WiiTASInputWindow;
|
class WiiTASInputWindow;
|
||||||
class WiiSpeakWindow;
|
|
||||||
struct WindowSystemInfo;
|
struct WindowSystemInfo;
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
@ -170,7 +169,6 @@ private:
|
|||||||
void ShowFIFOPlayer();
|
void ShowFIFOPlayer();
|
||||||
void ShowSkylanderPortal();
|
void ShowSkylanderPortal();
|
||||||
void ShowInfinityBase();
|
void ShowInfinityBase();
|
||||||
void ShowWiiSpeakWindow();
|
|
||||||
void ShowMemcardManager();
|
void ShowMemcardManager();
|
||||||
void ShowResourcePackManager();
|
void ShowResourcePackManager();
|
||||||
void ShowCheatsManager();
|
void ShowCheatsManager();
|
||||||
@ -246,7 +244,6 @@ private:
|
|||||||
FIFOPlayerWindow* m_fifo_window = nullptr;
|
FIFOPlayerWindow* m_fifo_window = nullptr;
|
||||||
SkylanderPortalWindow* m_skylander_window = nullptr;
|
SkylanderPortalWindow* m_skylander_window = nullptr;
|
||||||
InfinityBaseWindow* m_infinity_window = nullptr;
|
InfinityBaseWindow* m_infinity_window = nullptr;
|
||||||
WiiSpeakWindow* m_wii_speak_window = nullptr;
|
|
||||||
MappingWindow* m_hotkey_window = nullptr;
|
MappingWindow* m_hotkey_window = nullptr;
|
||||||
FreeLookWindow* m_freelook_window = nullptr;
|
FreeLookWindow* m_freelook_window = nullptr;
|
||||||
|
|
||||||
|
@ -237,7 +237,6 @@ void MenuBar::AddToolsMenu()
|
|||||||
auto* usb_device_menu = new QMenu(tr("Emulated USB Devices"), tools_menu);
|
auto* usb_device_menu = new QMenu(tr("Emulated USB Devices"), tools_menu);
|
||||||
usb_device_menu->addAction(tr("&Skylanders Portal"), this, &MenuBar::ShowSkylanderPortal);
|
usb_device_menu->addAction(tr("&Skylanders Portal"), this, &MenuBar::ShowSkylanderPortal);
|
||||||
usb_device_menu->addAction(tr("&Infinity Base"), this, &MenuBar::ShowInfinityBase);
|
usb_device_menu->addAction(tr("&Infinity Base"), this, &MenuBar::ShowInfinityBase);
|
||||||
usb_device_menu->addAction(tr("&Wii Speak"), this, &MenuBar::ShowWiiSpeakWindow);
|
|
||||||
tools_menu->addMenu(usb_device_menu);
|
tools_menu->addMenu(usb_device_menu);
|
||||||
|
|
||||||
tools_menu->addSeparator();
|
tools_menu->addSeparator();
|
||||||
|
@ -91,7 +91,6 @@ signals:
|
|||||||
void ShowResourcePackManager();
|
void ShowResourcePackManager();
|
||||||
void ShowSkylanderPortal();
|
void ShowSkylanderPortal();
|
||||||
void ShowInfinityBase();
|
void ShowInfinityBase();
|
||||||
void ShowWiiSpeakWindow();
|
|
||||||
void ConnectWiiRemote(int id);
|
void ConnectWiiRemote(int id);
|
||||||
|
|
||||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user