Skip to content

Commit 6ee6fd4

Browse files
committed
0 parents  commit 6ee6fd4

90 files changed

Lines changed: 69118 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: microsoft/setup-msbuild@v2
19+
20+
- name: Build
21+
run: msbuild igdl.vcxproj
22+
23+
- name: Release
24+
run: |
25+
gh release create release Release/libEGL.dll
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Release/

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[original](https://git.io/IngameDL)

config.cpp

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#include "config.h"
2+
#include "downloader.h"
3+
#include "overlay.h"
4+
#include <fstream>
5+
#include <iostream>
6+
#include <rapidjson/document.h>
7+
#include <rapidjson/stringbuffer.h>
8+
#include <rapidjson/writer.h>
9+
#include <sstream>
10+
11+
using namespace std;
12+
using namespace rapidjson;
13+
14+
void Config::LoadConfig() {
15+
ifstream ifs("igdl.cfg");
16+
string result;
17+
Document d;
18+
19+
if (!ifs.is_open()) return;
20+
21+
ifs >> result;
22+
ifs.close();
23+
d.Parse(result.c_str());
24+
25+
if (d.HasMember("downloadType")) {
26+
DL::downloadType = d["downloadType"].GetInt();
27+
if (DL::downloadType > 2 || DL::downloadType < 0) DL::downloadType = 2;
28+
}
29+
30+
if (d.HasMember("dontDownload")) DL::dontDownload = d["dontDownload"].GetBool();
31+
}
32+
33+
void Config::SaveConfig() {
34+
ofstream ofs("igdl.cfg");
35+
StringBuffer sb;
36+
Writer<StringBuffer> writer(sb);
37+
string result;
38+
39+
if (!ofs.is_open()) return;
40+
41+
writer.StartObject();
42+
writer.Key("downloadType");
43+
writer.Int(DL::downloadType);
44+
writer.Key("dontDownload");
45+
writer.Bool(DL::dontDownload);
46+
writer.EndObject();
47+
result = sb.GetString();
48+
ofs << result << endl;
49+
ofs.close();
50+
}

config.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#pragma once
2+
3+
namespace Config {
4+
void LoadConfig();
5+
void SaveConfig();
6+
}

0 commit comments

Comments
 (0)