mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-06-06 01:13:45 -04:00
Compare commits
2 commits
7e26c7e5d2
...
695f8fd197
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
695f8fd197 | ||
|
|
7efb4fc860 |
2 changed files with 20 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
|
|
@ -177,10 +177,8 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz
|
|||
queued_buffers.store(0);
|
||||
release_cv.notify_one();
|
||||
}
|
||||
|
||||
static constexpr std::array<s16, 6> silence{};
|
||||
for (size_t i = 0; i < num_frames; i++)
|
||||
std::memcpy(&output_buffer[i * frame_size], silence.data(), frame_size_bytes);
|
||||
std::memset(&output_buffer[i * frame_size], 0, frame_size_bytes);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@
|
|||
#include "qt_common/gui_settings.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#include "main_window.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
@ -106,16 +110,27 @@ int main(int argc, char* argv[]) {
|
|||
QCoreApplication::setOrganizationName(QStringLiteral("eden"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("eden"));
|
||||
|
||||
#ifdef _WIN32
|
||||
// Increases the maximum open file limit.
|
||||
// TODO: This should be common to all frontends.
|
||||
#ifdef _WIN32
|
||||
// MSVCRT limits this to 2048 for some inexplicable (and likely arcane) reason,
|
||||
// so we have to account for that as well.
|
||||
#ifdef __MSVCRT__
|
||||
_setmaxstdio(2048);
|
||||
#else
|
||||
_setmaxstdio(8192);
|
||||
#endif
|
||||
#elif defined(__APPLE__)
|
||||
#endif // __MSVCRT__
|
||||
#elif defined(__unix__) || defined(__APPLE__)
|
||||
// Set the max open file limit to 8192, or the hard limit.
|
||||
// Most sane systems should not hit the hard limit here.
|
||||
struct rlimit rl;
|
||||
if (getrlimit(RLIMIT_NOFILE, &rl) == 0) {
|
||||
rl.rlim_cur = std::min<rlim_t>(8192, rl.rlim_max);
|
||||
setrlimit(RLIMIT_NOFILE, &rl);
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
#if defined(__APPLE__)
|
||||
// If you start a bundle (binary) on OSX without the Terminal, the working directory is "/".
|
||||
// But since we require the working directory to be the executable path for the location of
|
||||
// the user folder in the Qt Frontend, we need to cd into that working directory
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue