Fixed keyboard bug where keypresses were not being registered, working on libreadline
[tpg/acess2.git] / Usermode / Libraries / libc.so_src / stub.c
index 0233b97..9f629ba 100644 (file)
@@ -4,8 +4,12 @@
 #include "stdio_int.h"\r
 #include "lib.h"\r
 \r
+#define USE_CPUID      0\r
+\r
 // === PROTOTYPES ===\r
+#if USE_CPUID\r
 static void    cpuid(uint32_t Num, uint32_t *EAX, uint32_t *EBX, uint32_t *EDX, uint32_t *ECX);\r
+#endif\r
 \r
 // === GLOBALS ===\r
 extern char **_envp;\r
@@ -14,7 +18,9 @@ extern struct sFILE   *stdin;
 extern struct sFILE    *stdout;\r
 extern struct sFILE    *stderr;\r
 // --- CPU Features ---\r
+#if USE_CPUID\r
 tCPUID gCPU_Features;\r
+#endif\r
 \r
 // === CODE ===\r
 /**\r
@@ -38,19 +44,20 @@ int SoMain(unsigned int BaseAddress, int argc, char **argv, char **envp)
        stderr = &_iob[2];\r
        stderr->FD = 2; stderr->Flags = FILE_FLAG_MODE_WRITE;\r
        \r
-       /*\r
+       #if USE_CPUID\r
        {\r
                uint32_t        ecx, edx;\r
                cpuid(1, NULL, NULL, &edx, &ecx);\r
                gCPU_Features.SSE  = edx & (1 << 25);   // SSE\r
                gCPU_Features.SSE2 = edx & (1 << 26);   // SSE2\r
        }\r
-       */\r
+       #endif\r
        \r
        return 1;\r
 }\r
 \r
 \r
+#if USE_CPUID\r
 /**\r
  * \brief Call the CPUID opcode\r
  */\r
@@ -69,3 +76,4 @@ static void cpuid(uint32_t Num, uint32_t *EAX, uint32_t *EBX, uint32_t *EDX, uin
        if(EDX) *EDX = edx;\r
        if(ECX) *ECX = ecx;\r
 }\r
+#endif\r

UCC git Repository :: git.ucc.asn.au