mirror of
https://github.com/ApfelTeeSaft/ida-rpc-ida9.git
synced 2026-08-26 19:23:37 +00:00
change ifdef to if else and kernel, i guess this gives the version number?
This commit is contained in:
+1
-1
@@ -235,7 +235,7 @@ static plugmod_t* idaapi IDAP_init( void )
|
||||
addon.id = "shigureJ.IDA.RPC";
|
||||
addon.name = "IDA RPC";
|
||||
addon.producer = "shigureJ";
|
||||
addon.url = "https://www.github.com/offlineJ";
|
||||
addon.url = "https://www.github.com/apfelteesaft";
|
||||
addon.version = AUTO_VERSION_STR;
|
||||
addon.freeform = "Copyright (c) 2018 shigureJ <https://keybase.io/shigurej>\n"
|
||||
"All rights reserved.\n";
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#include "discord-rpc.h"
|
||||
#include <ida.hpp>
|
||||
#include <kernwin.hpp>
|
||||
|
||||
namespace discord_utils
|
||||
{
|
||||
@@ -83,15 +85,14 @@ namespace discord_utils
|
||||
|
||||
( g_options.timeelapsed_enabled ) ? rpc.startTimestamp = start_time : rpc.startTimestamp = NULL;
|
||||
|
||||
#ifdef _Release
|
||||
rpc.largeImageKey = "ida";
|
||||
//rpc.smallImageKey = "ida-pro";
|
||||
#endif
|
||||
char version[ 32 ];
|
||||
get_kernel_version( version, sizeof( version ) );
|
||||
|
||||
#ifdef _Release64
|
||||
rpc.largeImageKey = "ida";
|
||||
//rpc.smallImageKey = "ida-pro64";
|
||||
#endif
|
||||
if ( strcmp( version, "9.0" ) >= 0 ) {
|
||||
rpc.largeImageKey = "ida";
|
||||
} else {
|
||||
rpc.largeImageKey = "ida"; // TODO replace with other version icons
|
||||
}
|
||||
|
||||
Discord_UpdatePresence( &rpc );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user