File tree Expand file tree Collapse file tree 1 file changed +22
-15
lines changed Expand file tree Collapse file tree 1 file changed +22
-15
lines changed Original file line number Diff line number Diff line change 1
- using System ;
1
+ using DeCraftLauncher . UIControls . Popup ;
2
+ using System ;
2
3
using System . Collections . Generic ;
3
4
using System . Data ;
4
5
using System . Diagnostics ;
@@ -43,29 +44,35 @@ public void Init(MainWindow caller)
43
44
return ;
44
45
}
45
46
initialTime = DateTime . UtcNow ;
46
- discord = new Discord . Discord ( 1180408357782298624 , ( UInt64 ) Discord . CreateFlags . Default ) ;
47
- activityManager = discord . GetActivityManager ( ) ;
48
- rpcThread = new Thread ( ( ) =>
47
+ try
49
48
{
50
- while ( true )
49
+ discord = new Discord . Discord ( 1180408357782298624 , ( UInt64 ) Discord . CreateFlags . NoRequireDiscord ) ;
50
+ activityManager = discord . GetActivityManager ( ) ;
51
+ rpcThread = new Thread ( ( ) =>
51
52
{
53
+ while ( true )
54
+ {
52
55
//activityMutex.WaitOne();
53
56
//activityMutex.ReleaseMutex();
54
57
55
58
//RunCallbacks has to be done on main thread
56
59
caller . Dispatcher . Invoke ( delegate
57
- {
58
- if ( discord != null )
59
60
{
60
- discord . RunCallbacks ( ) ;
61
- }
62
- } ) ;
63
- Thread . Sleep ( 200 ) ;
64
- }
65
- } ) ;
61
+ if ( discord != null )
62
+ {
63
+ discord . RunCallbacks ( ) ;
64
+ }
65
+ } ) ;
66
+ Thread . Sleep ( 200 ) ;
67
+ }
68
+ } ) ;
66
69
67
- rpcThread . Start ( ) ;
68
- inited = true ;
70
+ rpcThread . Start ( ) ;
71
+ inited = true ;
72
+ } catch ( Discord . ResultException )
73
+ {
74
+ //don't fucking care lmao
75
+ }
69
76
}
70
77
71
78
public void Close ( )
You can’t perform that action at this time.
0 commit comments