-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
163 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
SerialPrograms/Source/CommonFramework/Options/ResolutionOption.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* Resolution Option | ||
* | ||
* From: https://github.com/PokemonAutomation/Arduino-Source | ||
* | ||
*/ | ||
|
||
#include "CommonFramework/Windows/DpiScaler.h" | ||
#include "ResolutionOption.h" | ||
|
||
namespace PokemonAutomation{ | ||
|
||
|
||
ResolutionOption::ResolutionOption( | ||
std::string label, std::string description, | ||
int default_width, int default_height | ||
) | ||
: GroupOption(std::move(label), LockMode::LOCK_WHILE_RUNNING) | ||
, DESCRIPTION(std::move(description)) | ||
, WIDTH("<b>Width:</b>", LockMode::LOCK_WHILE_RUNNING, scale_dpi_width(default_width)) | ||
, HEIGHT("<b>Height:</b>", LockMode::LOCK_WHILE_RUNNING, scale_dpi_height(default_height)) | ||
{ | ||
PA_ADD_STATIC(DESCRIPTION); | ||
PA_ADD_OPTION(WIDTH); | ||
PA_ADD_OPTION(HEIGHT); | ||
} | ||
|
||
|
||
} |
31 changes: 31 additions & 0 deletions
31
SerialPrograms/Source/CommonFramework/Options/ResolutionOption.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* Resolution Option | ||
* | ||
* From: https://github.com/PokemonAutomation/Arduino-Source | ||
* | ||
*/ | ||
|
||
#ifndef PokemonAutomation_Options_ResolutionOption_H | ||
#define PokemonAutomation_Options_ResolutionOption_H | ||
|
||
#include "Common/Cpp/Options/StaticTextOption.h" | ||
#include "Common/Cpp/Options/SimpleIntegerOption.h" | ||
#include "Common/Cpp/Options/GroupOption.h" | ||
|
||
namespace PokemonAutomation{ | ||
|
||
|
||
class ResolutionOption : public GroupOption{ | ||
public: | ||
ResolutionOption( | ||
std::string label, std::string description, | ||
int default_width, int default_height | ||
); | ||
|
||
StaticTextOption DESCRIPTION; | ||
SimpleIntegerOption<uint32_t> WIDTH; | ||
SimpleIntegerOption<uint32_t> HEIGHT; | ||
}; | ||
|
||
|
||
} | ||
#endif |
55 changes: 55 additions & 0 deletions
55
SerialPrograms/Source/CommonFramework/Recording/StreamHistoryOption.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* Stream History Option | ||
* | ||
* From: https://github.com/PokemonAutomation/Arduino-Source | ||
* | ||
*/ | ||
|
||
#include "CommonFramework/Globals.h" | ||
#include "StreamHistoryOption.h" | ||
|
||
namespace PokemonAutomation{ | ||
|
||
|
||
StreamHistoryOption::StreamHistoryOption() | ||
: GroupOption( | ||
"Stream History", | ||
LockMode::LOCK_WHILE_RUNNING, | ||
true, | ||
IS_BETA_VERSION | ||
) | ||
, DESCRIPTION( | ||
"Keep a record of the recent video+audio streams. This will allow video capture " | ||
"for unexpected events.<br><br>" | ||
"<font color=\"orange\">Warning: This feature is computationally expensive and " | ||
"will require a more powerful computer to run (especially for multi-Switch programs).<br>" | ||
"Furthermore, the current implementation is inefficient as it will write a lot " | ||
"of data to disk. This feature is still a work-in-progress." | ||
"</font>" | ||
) | ||
, HISTORY_SECONDS( | ||
"<b>History (seconds):</b><br>" | ||
"Keep this many seconds of video and audio feed for video capture and debugging purposes.<br><br>" | ||
"<font color=\"orange\">Do not set this too large as it will consume a lot of memory and may exceed the " | ||
"attachment size limit for Discord notifications." | ||
"</font>", | ||
LockMode::UNLOCK_WHILE_RUNNING, | ||
30 | ||
) | ||
, VIDEO_BITRATE( | ||
"<b>Video Bit-Rate (kbps):</b><br>" | ||
"Lower = lower quality, smaller file size.<br>" | ||
"Higher = high quality, larger file size.<br><br>" | ||
"<font color=\"orange\">Large values can exceed the attachment size limit for Discord notifications." | ||
"</font>", | ||
LockMode::UNLOCK_WHILE_RUNNING, | ||
5000 | ||
) | ||
{ | ||
PA_ADD_STATIC(DESCRIPTION); | ||
PA_ADD_OPTION(HISTORY_SECONDS); | ||
PA_ADD_OPTION(VIDEO_BITRATE); | ||
} | ||
|
||
|
||
|
||
} |
29 changes: 29 additions & 0 deletions
29
SerialPrograms/Source/CommonFramework/Recording/StreamHistoryOption.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* Stream History Option | ||
* | ||
* From: https://github.com/PokemonAutomation/Arduino-Source | ||
* | ||
*/ | ||
|
||
#ifndef PokemonAutomation_StreamHistoryOption_H | ||
#define PokemonAutomation_StreamHistoryOption_H | ||
|
||
#include "Common/Cpp/Options/StaticTextOption.h" | ||
#include "Common/Cpp/Options/SimpleIntegerOption.h" | ||
#include "Common/Cpp/Options/GroupOption.h" | ||
|
||
namespace PokemonAutomation{ | ||
|
||
|
||
|
||
class StreamHistoryOption : public GroupOption{ | ||
public: | ||
StreamHistoryOption(); | ||
|
||
StaticTextOption DESCRIPTION; | ||
SimpleIntegerOption<uint16_t> HISTORY_SECONDS; | ||
SimpleIntegerOption<uint32_t> VIDEO_BITRATE; | ||
}; | ||
|
||
|
||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters