-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
d0c7e4e
commit 26ca4af
Showing
17 changed files
with
1,012 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Copyright 2020 GlitchyPSI | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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 @@ | ||
<span style="text-align: center; display: inline-block;"> | ||
<img src="images/icon.png" style="max-width: 30%;"> | ||
|
||
### VEGAS Pro Rich Presence for Discord | ||
|
||
Because why not? There wasn't any before. | ||
|
||
</span> | ||
|
||
## Overview | ||
|
||
This is an extension for VEGAS Pro from MAGIX VEGAS 13 (downloadable from MAGIX's website) that enables support for Discord's Rich Presence features. | ||
|
||
<img src="images/VEGAS_SS.png">_ | ||
|
||
## Features | ||
|
||
* Display how many tracks of both Audio and Video you're currently editing. | ||
|
||
* Displays whether you're rendering, and how much time has passed since you started, whether you cancelled, failed, or finished successfully. | ||
|
||
* Displays when you're just being lazy (no activity in one minute, lol) | ||
|
||
* Displays a logo related to your VEGAS version as well as its specific version on hover. | ||
|
||
## Roadmap | ||
|
||
- [x] Basic functionality stated above | ||
- [x] Able to turn on and off the Rich Presence | ||
- [ ] Change the old discord-rpc.dll with the new Game SDK library | ||
- [ ] Small key icons for when you're recording, etc... | ||
- [ ] Compatibility with Sony Vegas (Vegas Pro 12 and lower) | ||
|
||
## Requirements | ||
|
||
* MAGIX (not Sony) VEGAS Pro 13 and above (64-bit) | ||
* This does **NOT** work in Movie Studio! | ||
* .NET Framework 4.5 | ||
|
||
## Install Instructions | ||
|
||
Grab the latest `"VEGASRPC.zip"` from the [Releases tab](https://github.com/GlitchyPSI/VEGASRPC) and extract its contents in **My Documents/Vegas Application Extensions** or **C:/ProgramData/Vegas Pro/Application Extensions** (Only one of these!). | ||
|
||
## Building | ||
|
||
To build this extension, you need: | ||
* MAGIX VEGAS Pro 13 or later, | ||
* Visual Studio 2017 | ||
* .NET Framework 4.5 | ||
|
||
Drag your MAGIX VEGAS's ``ScriptPortal.Vegas.dll`` into the folder ``Libraries`` inside the "VEGAS4Discord" folder. This is because the library for VEGAS Scripting cannot be distributed. | ||
|
||
## License | ||
|
||
MIT. see LICENSE for more details. |
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,46 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27428.2015 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VEGASDiscordRPC", "VEGAS4Discord\VEGASDiscordRPC.csproj", "{562063EF-B459-4C3E-B407-144FDF8BC3EC}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug Unity|Any CPU = Debug Unity|Any CPU | ||
Debug Unity|x64 = Debug Unity|x64 | ||
Debug Unity|x86 = Debug Unity|x86 | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug Unity|Any CPU.ActiveCfg = Debug|Any CPU | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug Unity|Any CPU.Build.0 = Debug|Any CPU | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug Unity|x64.ActiveCfg = Debug|x64 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug Unity|x64.Build.0 = Debug|x64 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug Unity|x86.ActiveCfg = Debug|x86 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug Unity|x86.Build.0 = Debug|x86 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug|x64.ActiveCfg = Debug|x64 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug|x64.Build.0 = Debug|x64 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug|x86.ActiveCfg = Debug|x86 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Debug|x86.Build.0 = Debug|x86 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Release|x64.ActiveCfg = Release|x64 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Release|x64.Build.0 = Release|x64 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Release|x86.ActiveCfg = Release|x86 | ||
{562063EF-B459-4C3E-B407-144FDF8BC3EC}.Release|x86.Build.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {3852E9D2-3DCD-46E3-AB21-4DB367EFD8CB} | ||
EndGlobalSection | ||
EndGlobal |
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,85 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
// | ||
// Discord Rpc Wrapper for .NET Framework (DTZxPorter) 12/26/2017 | ||
// Wrapper created using the open-source discord-rpc extension at: | ||
// https://github.com/discordapp/discord-rpc | ||
// | ||
|
||
namespace DiscordRpcNet | ||
{ | ||
public class DiscordRpc | ||
{ | ||
private const string DiscordDll = "discord-rpc.dll"; | ||
|
||
[DllImport(DiscordDll, EntryPoint = "Discord_Initialize", CallingConvention = CallingConvention.Cdecl)] | ||
public static extern void Initialize(string applicationId, ref EventHandlers handlers, bool autoRegister, string optionalSteamId); | ||
[DllImport(DiscordDll, EntryPoint = "Discord_UpdatePresence", CallingConvention = CallingConvention.Cdecl)] | ||
public static extern void UpdatePresence(ref RichPresence presence); | ||
[DllImport(DiscordDll, EntryPoint = "Discord_Respond", CallingConvention = CallingConvention.Cdecl)] | ||
public static extern void Respond(string userid, ReplyValue reply); | ||
[DllImport(DiscordDll, EntryPoint = "Discord_RunCallbacks", CallingConvention = CallingConvention.Cdecl)] | ||
public static extern void RunCallbacks(); | ||
[DllImport(DiscordDll, EntryPoint = "Discord_Shutdown", CallingConvention = CallingConvention.Cdecl)] | ||
public static extern void Shutdown(); | ||
|
||
public enum ReplyValue : int | ||
{ | ||
No = 0, | ||
Yes = 1, | ||
Ignore = 2 | ||
} | ||
|
||
[System.Serializable] | ||
public struct JoinRequest | ||
{ | ||
public string userId; | ||
public string username; | ||
public string discriminator; | ||
public string avatar; | ||
} | ||
|
||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
public delegate void ReadyCallback(); | ||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
public delegate void DisconnectedCallback(int errorCode, string message); | ||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
public delegate void ErrorCallback(int errorCode, string message); | ||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
public delegate void JoinGameCallback(string joinSecret); | ||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
public delegate void SpectateGameCallback(string spectateSecret); | ||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
public delegate void JoinRequestCallback(ref JoinRequest request); | ||
|
||
[System.Serializable] | ||
public struct RichPresence | ||
{ | ||
public string state; /* max 128 bytes */ | ||
public string details; /* max 128 bytes */ | ||
public long startTimestamp; | ||
public long endTimestamp; | ||
public string largeImageKey; /* max 32 bytes */ | ||
public string largeImageText; /* max 128 bytes */ | ||
public string smallImageKey; /* max 32 bytes */ | ||
public string smallImageText; /* max 128 bytes */ | ||
public string partyId; /* max 128 bytes */ | ||
public int partySize; | ||
public int partyMax; | ||
public string matchSecret; /* max 128 bytes */ | ||
public string joinSecret; /* max 128 bytes */ | ||
public string spectateSecret; /* max 128 bytes */ | ||
public byte instance; | ||
} | ||
|
||
public struct EventHandlers | ||
{ | ||
public ReadyCallback readyCallback; | ||
public DisconnectedCallback disconnectedCallback; | ||
public ErrorCallback errorCallback; | ||
public JoinGameCallback joinCallback; | ||
public SpectateGameCallback spectateCallback; | ||
public JoinRequestCallback joinRequestCallback; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Data; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Forms; | ||
|
||
namespace VegasDiscordRPC.Forms | ||
{ | ||
public partial class RichPresenceToggle : Form | ||
{ | ||
Timer down; | ||
bool stat; | ||
public RichPresenceToggle(bool status) | ||
{ | ||
down = new Timer(); | ||
down.Interval = 2000; | ||
down.Tick += (a, b) => OnTimerEnd(); | ||
InitializeComponent(); | ||
stat = status; | ||
} | ||
|
||
void OnTimerEnd() | ||
{ | ||
Close(); | ||
} | ||
|
||
private void RichPresenceToggle_Load(object sender, EventArgs e) | ||
{ | ||
down.Start(); | ||
lbRPCStatus.Text = $"Discord Rich Presence is now {(stat ? "ON" : "OFF")}"; | ||
} | ||
} | ||
} |
Oops, something went wrong.