summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/yuzu.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-03 12:55:58 -0400
committerGravatar Lioncash2018-08-04 02:36:57 -0400
commit6030c5ce412e44ddcfe0a31c6747a017166bf33d (patch)
tree2b79fa019f07e601b5170e92e93b69788ffde949 /src/yuzu_cmd/yuzu.cpp
parentMerge pull request #911 from lioncash/prototype (diff)
downloadyuzu-6030c5ce412e44ddcfe0a31c6747a017166bf33d.tar.gz
yuzu-6030c5ce412e44ddcfe0a31c6747a017166bf33d.tar.xz
yuzu-6030c5ce412e44ddcfe0a31c6747a017166bf33d.zip
video_core: Eliminate the g_renderer global variable
We move the initialization of the renderer to the core class, while keeping the creation of it and any other specifics in video_core. This way we can ensure that the renderer is initialized and doesn't give unfettered access to the renderer. This also makes dependencies on types more explicit. For example, the GPU class doesn't need to depend on the existence of a renderer, it only needs to care about whether or not it has a rasterizer, but since it was accessing the global variable, it was also making the renderer a part of its dependency chain. By adjusting the interface, we can get rid of this dependency.
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r--src/yuzu_cmd/yuzu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 5ff6266bf..5911ec177 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -187,7 +187,7 @@ int main(int argc, char** argv) {
187 LOG_CRITICAL(Frontend, "Failed to determine system mode!"); 187 LOG_CRITICAL(Frontend, "Failed to determine system mode!");
188 return -1; 188 return -1;
189 case Core::System::ResultStatus::ErrorVideoCore: 189 case Core::System::ResultStatus::ErrorVideoCore:
190 LOG_CRITICAL(Frontend, "VideoCore not initialized"); 190 LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!");
191 return -1; 191 return -1;
192 case Core::System::ResultStatus::Success: 192 case Core::System::ResultStatus::Success:
193 break; // Expected case 193 break; // Expected case