New upstream version 24.0.3+dfsg1
This commit is contained in:
parent
5a730d6ec3
commit
52fa83f147
16 changed files with 213 additions and 32 deletions
|
|
@ -1911,6 +1911,18 @@ static void load_debug_privilege(void)
|
|||
NULL);
|
||||
}
|
||||
|
||||
if (!!LookupPrivilegeValue(NULL, SE_INC_BASE_PRIORITY_NAME, &val)) {
|
||||
tp.PrivilegeCount = 1;
|
||||
tp.Privileges[0].Luid = val;
|
||||
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
|
||||
|
||||
if (!AdjustTokenPrivileges(token, false, &tp, sizeof(tp), NULL,
|
||||
NULL)) {
|
||||
blog(LOG_INFO, "Could not set privilege to "
|
||||
"increase GPU priority");
|
||||
}
|
||||
}
|
||||
|
||||
CloseHandle(token);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -392,6 +392,12 @@ OBSBasic::OBSBasic(QWidget *parent)
|
|||
SLOT(PreviewDisabledMenu(const QPoint &)));
|
||||
connect(ui->enablePreviewButton, SIGNAL(clicked()), this,
|
||||
SLOT(TogglePreview()));
|
||||
|
||||
connect(ui->scenes->model(),
|
||||
SIGNAL(rowsMoved(QModelIndex, int, int, QModelIndex, int)),
|
||||
this,
|
||||
SLOT(ScenesReordered(const QModelIndex &, int, int,
|
||||
const QModelIndex &, int)));
|
||||
}
|
||||
|
||||
static void SaveAudioDevice(const char *name, int channel, obs_data_t *parent,
|
||||
|
|
@ -7548,6 +7554,29 @@ void OBSBasic::UpdatePause(bool activate)
|
|||
#define MBYTES_LEFT_STOP_REC 50ULL
|
||||
#define MAX_BYTES_LEFT (MBYTES_LEFT_STOP_REC * MBYTE)
|
||||
|
||||
const char *OBSBasic::GetCurrentOutputPath()
|
||||
{
|
||||
const char *path = nullptr;
|
||||
const char *mode = config_get_string(Config(), "Output", "Mode");
|
||||
|
||||
if (strcmp(mode, "Advanced") == 0) {
|
||||
const char *advanced_mode =
|
||||
config_get_string(Config(), "AdvOut", "RecType");
|
||||
|
||||
if (strcmp(advanced_mode, "FFmpeg") == 0) {
|
||||
path = config_get_string(Config(), "AdvOut",
|
||||
"FFFilePath");
|
||||
} else {
|
||||
path = config_get_string(Config(), "AdvOut",
|
||||
"RecFilePath");
|
||||
}
|
||||
} else {
|
||||
path = config_get_string(Config(), "SimpleOutput", "FilePath");
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
void OBSBasic::DiskSpaceMessage()
|
||||
{
|
||||
blog(LOG_ERROR, "Recording stopped because of low disk space");
|
||||
|
|
@ -7558,12 +7587,11 @@ void OBSBasic::DiskSpaceMessage()
|
|||
|
||||
bool OBSBasic::LowDiskSpace()
|
||||
{
|
||||
const char *mode = config_get_string(Config(), "Output", "Mode");
|
||||
const char *path =
|
||||
strcmp(mode, "Advanced")
|
||||
? config_get_string(Config(), "SimpleOutput",
|
||||
"FilePath")
|
||||
: config_get_string(Config(), "AdvOut", "RecFilePath");
|
||||
const char *path;
|
||||
|
||||
path = GetCurrentOutputPath();
|
||||
if (!path)
|
||||
return false;
|
||||
|
||||
uint64_t num_bytes = os_get_free_disk_space(path);
|
||||
|
||||
|
|
@ -7582,3 +7610,15 @@ void OBSBasic::CheckDiskSpaceRemaining()
|
|||
DiskSpaceMessage();
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::ScenesReordered(const QModelIndex &parent, int start, int end,
|
||||
const QModelIndex &destination, int row)
|
||||
{
|
||||
UNUSED_PARAMETER(parent);
|
||||
UNUSED_PARAMETER(start);
|
||||
UNUSED_PARAMETER(end);
|
||||
UNUSED_PARAMETER(destination);
|
||||
UNUSED_PARAMETER(row);
|
||||
|
||||
OBSProjector::UpdateMultiviewProjectors();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -560,6 +560,9 @@ private slots:
|
|||
|
||||
void CheckDiskSpaceRemaining();
|
||||
|
||||
void ScenesReordered(const QModelIndex &parent, int start, int end,
|
||||
const QModelIndex &destination, int row);
|
||||
|
||||
private:
|
||||
/* OBS Callbacks */
|
||||
static void SceneReordered(void *data, calldata_t *params);
|
||||
|
|
@ -681,6 +684,8 @@ public:
|
|||
|
||||
static OBSBasic *Get();
|
||||
|
||||
const char *GetCurrentOutputPath();
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent *event) override;
|
||||
virtual void changeEvent(QEvent *event) override;
|
||||
|
|
|
|||
|
|
@ -650,13 +650,15 @@ void OBSBasicPreview::mouseReleaseEvent(QMouseEvent *event)
|
|||
|
||||
std::lock_guard<std::mutex> lock(selectMutex);
|
||||
if (altDown || ctrlDown || shiftDown) {
|
||||
for (int i = 0; i < selectedItems.size(); i++) {
|
||||
for (size_t i = 0; i < selectedItems.size();
|
||||
i++) {
|
||||
obs_sceneitem_select(selectedItems[i],
|
||||
true);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < hoveredPreviewItems.size(); i++) {
|
||||
for (size_t i = 0; i < hoveredPreviewItems.size();
|
||||
i++) {
|
||||
bool select = true;
|
||||
obs_sceneitem_t *item = hoveredPreviewItems[i];
|
||||
|
||||
|
|
@ -1677,7 +1679,7 @@ bool OBSBasicPreview::DrawSelectedItem(obs_scene_t *scene,
|
|||
bool hovered = false;
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(prev->selectMutex);
|
||||
for (int i = 0; i < prev->hoveredPreviewItems.size(); i++) {
|
||||
for (size_t i = 0; i < prev->hoveredPreviewItems.size(); i++) {
|
||||
if (prev->hoveredPreviewItems[i] == item) {
|
||||
hovered = true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -297,13 +297,7 @@ void OBSBasicStats::Update()
|
|||
|
||||
/* ------------------ */
|
||||
|
||||
const char *mode = config_get_string(main->Config(), "Output", "Mode");
|
||||
const char *path = strcmp(mode, "Advanced")
|
||||
? config_get_string(main->Config(),
|
||||
"SimpleOutput",
|
||||
"FilePath")
|
||||
: config_get_string(main->Config(), "AdvOut",
|
||||
"RecFilePath");
|
||||
const char *path = main->GetCurrentOutputPath();
|
||||
|
||||
#define MBYTE (1024ULL * 1024ULL)
|
||||
#define GBYTE (1024ULL * 1024ULL * 1024ULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue