Browse Source

Fixed discord lib

tags/0.9
Madiwka3 3 years ago
parent
commit
3f3903607b
4 changed files with 14 additions and 5 deletions
  1. BIN
      libdiscord-rpc.so
  2. +10
    -3
      main.lua
  3. +3
    -1
      readme.md
  4. +1
    -1
      src/constantvars.lua

BIN
libdiscord-rpc.so View File


+ 10
- 3
main.lua View File

@@ -2,10 +2,12 @@


require "src/dependencies"
local content = love.filesystem.read("src/libdiscord-rpc.so")
print(content)
love.filesystem.write("libdiscord-rpc.so", content)
--local content = love.filesystem.read("src/libdiscord-rpc.so")
--print(content)
--love.filesystem.write("libdiscord-rpc.so", content)
if not isAndroid then
local discordRPC = require("src/discordRPC")
end

local appId = require("applicationId")
--CANCELLED ATTEMPETED SHADING (NOT WORKING)
@@ -946,6 +948,7 @@ function love.load()
smallfont = love.graphics.newFont("font.ttf", 25)
scorefont = love.graphics.newFont("font.ttf", 60)
love.graphics.setFont(smallfont)
if not isAndroid then
discordRPC.initialize(appId, true)
local now = os.time(os.date("*t"))
presence = {
@@ -954,6 +957,7 @@ function love.load()
largeImageKey = "pongnew",
largeImageText = "Nuclear Pong",
}
end

nextPresenceUpdate = 0
--push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, {
@@ -1051,11 +1055,14 @@ function love.update(dt)
globalMessage = "none"
end
end
if not isAndroid then
if nextPresenceUpdate < love.timer.getTime() then
discordRPC.updatePresence(presence)
nextPresenceUpdate = love.timer.getTime() + 2.0
end
discordRPC.runCallbacks()
end
if not lowcpu then
if (love.timer.getFPS() < 50 and gameState ~= "animation") then
countinglowcpu = countinglowcpu + 1


+ 3
- 1
readme.md View File

@@ -18,7 +18,7 @@ To play the game on Linux, just launch the ./debuggame.sh and enjoy the game!
To play on Linux like a normie, you can <a href = "https://madi-wka.club/NuclearPongLinux.tar.gz">Download</a> the latest release (may be outdated compared to the source version), or you can download the LOVE file from the releases tab.
To play on Windows, download a Windows executable from the releases tab!
# Changes
<p>0.8 is here! Changelog:
<p>0.9 is here! Changelog:
<ul>
<li>Changed the background. Fancy.</li>
<li>Fixed button text alignment</li>
@@ -35,3 +35,5 @@ ToDo:






+ 1
- 1
src/constantvars.lua View File

@@ -2,4 +2,4 @@ VIRTUAL_WIDTH = 1280
VIRTUAL_HEIGHT = 720
WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720
isAndroid = false
isAndroid = true

Loading…
Cancel
Save